From 030f2654a5c472229d20e283072bd76a5b1439cc Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 3 Oct 2019 10:12:42 +0000 Subject: [PATCH] [IMP] web: add support for itemprop on img Take the following QWeb snippet: ```
``` When the image is rendered, the `itemprop="image"` remains on the `
` tag, it is not set on the `` tag. We add the support of the `itemprop` option, so it can be added to the `` tag: ```
``` opw-2076934 --- addons/web/models/ir_qweb.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/models/ir_qweb.py b/addons/web/models/ir_qweb.py index 1083916ebf5..211dc9bea6e 100644 --- a/addons/web/models/ir_qweb.py +++ b/addons/web/models/ir_qweb.py @@ -69,8 +69,13 @@ class Image(models.AbstractModel): elif options.get('zoom'): src_zoom = options['zoom'] + itemprop = None + if options.get('itemprop'): + itemprop = options['itemprop'] + atts = OrderedDict() atts["src"] = src + atts["itemprop"] = itemprop atts["class"] = classes atts["style"] = options.get('style') atts["alt"] = alt