From cdaee93f7fd75098b856cde77bd33b49a3f3f740 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 29 Aug 2016 15:20:47 +0200 Subject: [PATCH] [FIX] web_editor: odoo.define can be undefined if not in edit mode Commit 933949085d274d766c9f23094bb41fe8ebf7cf2f added the odoo variable definition in the iframe template so the condition which checked if odoo.define is available had to be adapted. --- addons/web_editor/views/iframe.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/views/iframe.xml b/addons/web_editor/views/iframe.xml index 4c29a1b12f0..6ed1f39eddf 100644 --- a/addons/web_editor/views/iframe.xml +++ b/addons/web_editor/views/iframe.xml @@ -45,7 +45,7 @@ } }; } - if(window['odoo']) { + if(window.odoo.define) { odoo.define('web.csrf', function (require) { var token = ""; var core = require('web.core');