Daily updates from Odoo
Tuesday, March 24, 2020
1 change
Code cleanup and technical improvements
Email, SMS, and related communication templates now use a shared rendering service instead of separate internal paths. This simplifies maintenance and keeps link handling and shortening consistent across affected business apps, with no intended change for end users.
Original PR description
PURPOSE Merge rendering tools used in mail and sms templates and move them directly in mail.render.mixin SPECIFICATIONS Clean rendering methods API and calls. Ensure they are private. Improve naming and docstrings to ease understanding. Move rendering methods on mail.render.mixin. It makes no senss to have to create a void mail.template recordset just to invoke jinjna rendering engine. Now rendering will be available * either directly through inherit; * either by calling env['mail.render.mixin']._render_template(); Move local to global links convertion as well as links shortening tool methods on mail.render.mixin . That way this mixin holds tools related to rendering and its post-processing. This impacts mail.template, sms.template and mailing.mailing as side effect without any functional change. LINKS Task ID 1963529 Community PR odoo/odoo#32397 Enterprise PR odoo/enterprise#8634 Upgrade PR odoo/upgrade#911