[IMP] website: multi-website snippets with the same key
Allow duplicate snippets to have different versions for different websites This commit closes #24429
This commit is contained in:
committed by
Jeremy Kersten
parent
042e7862be
commit
4f9d9d169f
@@ -46,7 +46,12 @@ class QWeb(models.AbstractModel):
|
||||
|
||||
def _compile_directive_snippet(self, el, options):
|
||||
el.set('t-call', el.attrib.pop('t-snippet'))
|
||||
name = self.env['ir.ui.view'].search([('key', '=', el.attrib.get('t-call'))]).display_name
|
||||
name = self.env['ir.ui.view'].search([
|
||||
('key', '=', el.attrib.get('t-call')),
|
||||
'|',
|
||||
('website_id', '=', options.get('website_id', False)),
|
||||
('website_id', '=', False)
|
||||
], order='website_id DESC', limit=1).display_name
|
||||
thumbnail = el.attrib.pop('t-thumbnail', "oe-thumbnail")
|
||||
div = u'<div name="%s" data-oe-type="snippet" data-oe-thumbnail="%s">' % (
|
||||
escape(pycompat.to_text(name)),
|
||||
|
||||
Reference in New Issue
Block a user