diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-04-24 13:38:17 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-05-07 13:23:07 +0000 |
| commit | e9230a1e945cac0fab986005f714c878af90be63 (patch) | |
| tree | a6350f73dce7dc9cb618b9629382ab1cbddf19ed /addons/web/static/src/js/views/basic | |
| parent | 557582e88b93879a6db870317ae8a57f23c11759 (diff) | |
[FIX] web: Prevent page reload during sale tour test
* A step has been added to the sale tour in order to ask the user
to update the company data. As a page reload breaks the tour test
we need to prevent it in such situation.
TaskID :2187222
closes odoo/odoo#46167
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 8de831ee506..9771fcc63e9 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -91,6 +91,7 @@ var Domain = require('web.Domain'); var session = require('web.session'); var utils = require('web.utils'); var viewUtils = require('web.viewUtils'); +var localStorage = require('web.local_storage'); var _t = core._t; @@ -3762,7 +3763,7 @@ var BasicModel = AbstractModel.extend({ * * Reloads the currencies if the main model is 'res.currency'. * Reloads the webclient if we modify a res.company, to (un)activate the - * multi-company environment. + * multi-company environment if we are not in a tour test. * * @private * @param {Object} dataPoint @@ -3774,7 +3775,7 @@ var BasicModel = AbstractModel.extend({ if (dataPoint.model === 'res.currency') { session.reloadCurrencies(); } - if (dataPoint.model === 'res.company') { + if (dataPoint.model === 'res.company' && !localStorage.getItem('running_tour')) { this.do_action('reload_context'); } if (_.contains(this.noCacheModels, dataPoint.model)) { |
