summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/utils.js
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2019-10-23 16:25:27 +0000
committerfw-bot <otis@odoo.com>2019-10-24 17:20:59 +0000
commitc86d37c755204f469e1653312493d8cceb2ec05a (patch)
tree0d14cd59546f3a211222fecb9ed9c4cb7c68bb4b /addons/website/static/src/js/utils.js
parent4ded923bb703a305a36922790781ef1aebe0915d (diff)
[FIX] web_editor, *: fix the theme colorpicker
*: website Inherited colorpicker were not used due to the context missing the website_id and the method call being used instead of call_kw. task-2092386 closes odoo/odoo#39357 X-original-commit: 7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/js/utils.js')
-rw-r--r--addons/website/static/src/js/utils.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js
index d8e69e3eba4..f852df03ad6 100644
--- a/addons/website/static/src/js/utils.js
+++ b/addons/website/static/src/js/utils.js
@@ -3,9 +3,19 @@ odoo.define('website.utils', function (require) {
var ajax = require('web.ajax');
var core = require('web.core');
+var weContext = require('web_editor.context');
var qweb = core.qweb;
+//TODO Remove me !
+var weGetContext = weContext.get;
+weContext.get = function (context) {
+ var html = document.documentElement;
+ return _.extend({
+ website_id: html.getAttribute('data-website-id') | 0,
+ }, weGetContext(context), context);
+};
+
/**
* Allows to load anchors from a page.
*