summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-01-29 14:14:38 +0000
committerRaphael Collet <rco@odoo.com>2020-01-30 12:31:58 +0000
commita707bba744174cceeda9cbd180df63f9e66cf837 (patch)
tree5f15df59a0b6bafc8555ffdba1bf566405df59a5 /addons/web/static/src/js
parent23490fc22fbd0174ace5558c9509b1bb856e03d2 (diff)
[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#44295 X-original-commit: b1ddd9c95bc642e42eb0d3d51066902d5283ba04 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions