In Odoo 15, mail.template function _render_template seems different with older versions
When we execute this code:
we got this result:
How to fix it?
Apparently, _render_template now returns a dictionary with key of model id and value of the rendered template, as with the res_ids parameter as well now requires a list of ids of the model to be rendered.
Here is the solution..
We take the dictionary value of the _render_template return value, by assigning the current document id as the key.
Why self._origin.id ?
This is because the sample code resides on an onchange function.
If it is on a regular function, then just use [self.id]