Files
odoo_source/addons/digest/models
Thibault Delavallée 3d5b012501 [REF] mail, various: cleanup usage of options in render mixin
Due to recent improvements (Jinja -> Qweb, safe rendering) rendering API
supports several ways of giving options to the rendering process. Those
have mainly two usage

  * ``preserve_comments`` : keep comments in rendered HTML, used notably
    in mass mailing or digest to keep browser-specific comments;
  * ``post_process`` : perform a post processing on rendered HTML, used notably
    to process local links and add tracking to shortened links;

All those are now given directly inside an optional ``options`` parameter
given to ``_render_field`` and its sub-method ``_render_template``.

They can also be defined as field level, using ``render_options`` field
parameter. Some fields are updated

  * composer mixin body (which impacts all inheriting models, notably
    mail composer, survey and elearning invite wizards as well as appraisal
    and appraisal feedback): post processing is now always done by default.
    It was already done manually in calls that can be simplified;
  * mail template body_html: post processing is now always done by default. It
    was already done manually in calls that can be simplified;
  * mailing body_html and preview are now post processed by default. It was
    already the case in testing wizard. Preview is updated to avoid post
    processing of links, as it was before. Remaining use case is the sending
    which uses the mail composer, therefore was already post processed;

Finally some 'compute_lang' are explicitly added in _render_field calls in
order to be explicit on what we want, instead of being unsure.

Task-2710804 (Mail: Clean MailThread API)
Prepares Task-2088884 (Mail: Use editable computed stored fields in composer)

Part-of: odoo/odoo#106072
2022-11-21 19:55:13 +01:00
..