diff options
| author | svs-odoo <svs@odoo.com> | 2018-10-02 06:54:24 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-02-18 12:56:05 +0000 |
| commit | b35d103cc0fe64547c3212ef01ab329faf0bacc4 (patch) | |
| tree | 1f25693e1ab87bcd31d967deb92cf65e1a2a7710 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | aa8aadd2ad1bab03d9e4b15c88486996d777fdc0 (diff) | |
[IMP] web: reload currencies when activating one
Active currencies are given in session_info, in the page source.
When the user activated a new currency, he had to reload the page
to make the browser aware of that new currency (without reloading,
there was no currency symbol displayed next to the amounts).
This rev. forces a reload of the currencies each time a currency is
edited.
Task #1838654
closes odoo/odoo#31192
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 5 |
1 files changed, 5 insertions, 0 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 3e20035734d..4d86ef4293b 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -3477,6 +3477,8 @@ var BasicModel = AbstractModel.extend({ * Invalidates the DataManager's cache if the main model (i.e. the model of * its root parent) of the given dataPoint is a model in 'noCacheModels'. * + * Reloads the currencies if the main model is 'res.currency'. + * * @private * @param {Object} dataPoint */ @@ -3484,6 +3486,9 @@ var BasicModel = AbstractModel.extend({ while (dataPoint.parentID) { dataPoint = this.localData[dataPoint.parentID]; } + if (dataPoint.model === 'res.currency') { + session.reloadCurrencies(); + } if (_.contains(this.noCacheModels, dataPoint.model)) { core.bus.trigger('clear_cache'); } |
