From 39f0f5db77f793c7fb996d53195524de0e035de4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 27 Jun 2018 09:50:01 +0200 Subject: [PATCH] [FIX] ir_qweb: send template options in context to the fields Application of a fix more specific to the problem of the contact widget which can not serialize the dictionary because it contains the values of the context of which browse record. (because contact try to json.dumps options for multi-edition feature in web_editor) opw-1859848 https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922 --- addons/web/models/ir_qweb.py | 2 +- addons/web_editor/models/ir_qweb.py | 1 + odoo/addons/base/ir/ir_qweb/fields.py | 4 ++-- odoo/addons/base/ir/ir_qweb/ir_qweb.py | 22 +++++----------------- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/addons/web/models/ir_qweb.py b/addons/web/models/ir_qweb.py index 0a5e0deb4e9..972ae4d813d 100644 --- a/addons/web/models/ir_qweb.py +++ b/addons/web/models/ir_qweb.py @@ -65,7 +65,7 @@ class Image(models.AbstractModel): atts["data-zoom"] = src_zoom and u'1' or None atts["data-zoom-image"] = src_zoom - atts = self.env['ir.qweb']._post_processing_att('img', atts, options) + atts = self.env['ir.qweb']._post_processing_att('img', atts, options.get('template_options')) img = ['