summaryrefslogtreecommitdiff
path: root/addons/website/views/assets.xml
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-12-18 10:52:33 +0000
committerAaron Bohy <aab@odoo.com>2020-12-18 13:39:48 +0000
commit47a74f2aaf54bddf51a828c4b5a76c392944bcd5 (patch)
treeeaf6dcb77fc2f04ba8710f0534a8d3e398ba2e26 /addons/website/views/assets.xml
parenteb5398cac2bcf671ccadf99b129e661faffa92d7 (diff)
[FIX] website: dashboard: mounted called twice
Before this commit, the 'mounted' method of the ControlPanel in the website dashboard was called twice, when entering the dashboard. It happened because the dashboard updated the ControlPanel before being actually mounted, so mounted was called once when the dashboard was mounted, and once when the update was applied. Ideally, this should not be an issue (this isn't an issue with owl). However, in Odoo, we mix layers of Owl Components and legacy widgets. In these situations, the above scenario isn't properly handled (and can't be). As a consequence, in mobile (enterprise), it crashed because an handler bound in mounted (thus twice) was only unbound once. This commit avoids the issue by correctly setting the control panel props before rendering it (the update was actually useless). opw~2417307 closes odoo/odoo#63574 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Diffstat (limited to 'addons/website/views/assets.xml')
-rw-r--r--addons/website/views/assets.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website/views/assets.xml b/addons/website/views/assets.xml
index ec696753ff6..e6a65bc7afd 100644
--- a/addons/website/views/assets.xml
+++ b/addons/website/views/assets.xml
@@ -48,6 +48,7 @@
<template id="qunit_suite" inherit_id="web.qunit_suite_tests">
<xpath expr="//script[last()]" position="after">
+ <script type="text/javascript" src="/website/static/tests/dashboard_tests.js"/>
<script type="text/javascript" src="/website/static/tests/website_tests.js"/>
</xpath>
</template>