Files
odoo_source/addons/product_email_template
Andrea Grazioso (agr-odoo) 410efa6012 [FIX] product_email_template: avoid traceback when referring to "object"
1. Activate 'Deliver Content by Email' in the Sales>Configuration>Settings
2. Create a mail template with Product Template for 'Applies to' and
a dynamic field (e.g. ${object.company_id.name}) in the body
3. Add this mail template on a [DEMO] product 'Automatic Email at
Invoice' field, in the Sales tab
4. Create an invoice with [DEMO], confirm it.
5. If the ID of the invoice does not exist as a product.product, you get a
traceback

The reason is that the model used for the template rendering is the
one specified on the template, but the res_id given to the composer
is the one from the invoice.

opw-2476169

closes odoo/odoo#74519

X-original-commit: 67bdd9cada7b06bc73d7bebedb7f10547e425055
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-30 18:30:32 +00:00
..
…