-
- Downloads
[FIX] base: avoid systematic invalidation of web.report_assets_common
The issue is: the user wants to send an invoice to a customer, changes
the email template, and after the onchange, the field "Template" of the
wizard is empty.
Here is what happens. The onchange on the template renders a PDF file
with the corresponding invoice document. The rendering builds some
assets to convert the invoice to a PDF document, and former assets are
deleted. The deletion of former assets (`ir.attachment` records)
invalidates the whole record cache, which implicitly clears all the
fields of the record of the onchange.
The problem is that the asset is systematically invalidated by the
rendering of the report itself. This hack changes the CSS assets to
introduce company-specific colors for the rendering of reports. This
implementation is actually not consistent with the fact that assets are
kept in cache by the server.
This patch does not fix the root cause of the problem, but it reduces
the sides effects of it, and makes the issue above less frequent. It
simply consists in not updating the asset's attachment when its value is
already correct.
OPW 2168623
OPW 2171040
closes odoo/odoo#44225
Signed-off-by:
Olivier Dony (odo) <odo@openerp.com>
Loading
Please register or sign in to comment