Files
odoo_source/addons/test_mail_full
Alexandre Kühn c0da919697 [REF] mail: discuss model html field and trusted insert
This commit allows to define html fields in discuss models,
so that when insert is trusted they are automatically markup.

By default, all model insert are untrusted. To make a trusted
insertion, we should pass 2nd parameter `{ html: true }` to
an `insert()` method. The param is intentionally named `html`
instead of `trusted`, so that it triggers ci/security for
reviewers awareness.

It's still possible to immediately assign a markup on the html
fields, like before.

This changes simplifies the code, so that we don't have to dissect
model data everytime and make sure all bits are properly markup.
The dissect operation added many LOCs and we frequently missed to
markup the data in some flows. Being able to flag html fields at
model definition and flagging an insert safe keeps the security
concern while helping properly markup-ing all the data.

Part-of: odoo/odoo#139501
2023-10-26 13:41:16 +00:00
..
…
…