Alexandre Kühn b3c231b1b2 [FIX] mail,*: markup chatbot livechat message
calendar, im_livechat

Before this commit, messages in chatbot conversation were not
properly markup. This comes from changes from [1] that added
trusted insert. Original code in `Record.insert()` makes a model
insertion of the data using the `html` flag. Patches must not
override `static insert()` as only the super call is affected by
the provided `html` flag. For patches to take account of it, they
must instead patch `_insert`, with `_` prefix, which is internally
called by original `Record.insert()`.

In addition:
- `static insert` allows array of data while `static _insert` works
  with data on single record. Patches were designed with data on
  single record, so some code were not working properly
- Signature of `static insert` has been overloaded with new option
  `html: true`, so patches must propagate it. They were only
  propagating `data` and omitting the 2nd paramater, which results
  in omitting provided `html` thus falling back to `html: false`,
  resulting to non-escaping message body

This commit fixes all model patches to override `static _insert`
instead of `static insert`.

[1]: https://github.com/odoo/odoo/pull/139501

closes odoo/odoo#140064

Related: odoo/enterprise#49718
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-27 16:09:34 +00:00
2023-10-27 08:36:16 +00:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%