diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-07-31 11:47:53 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-08-04 12:44:18 +0000 |
| commit | 6e780b2e4f69cdee247afe4be964227a90b3d738 (patch) | |
| tree | f5a380f5b66963e02d9c53ded344353f0fa9c642 /addons/lunch/static | |
| parent | f8ab35f9e18d033cb9fa2b28c6abe3689afc774a (diff) | |
[IMP] lunch: Make dispatch actions synchronous
Before this commit, the return value of some of the dispatch actions of
the lunch model extension was wrapped inside a promise with the use of
the "async" keyword. This caused the synchronous aspect of all these
methods to be delayed.
Now they are not longer asynchronous.
Diffstat (limited to 'addons/lunch/static')
| -rw-r--r-- | addons/lunch/static/src/js/lunch_model_extension.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/lunch/static/src/js/lunch_model_extension.js b/addons/lunch/static/src/js/lunch_model_extension.js index fccd82fdce9..aec64b9762a 100644 --- a/addons/lunch/static/src/js/lunch_model_extension.js +++ b/addons/lunch/static/src/js/lunch_model_extension.js @@ -55,9 +55,9 @@ odoo.define("lunch/static/src/js/lunch_model_extension.js", function (require) { * @param {number} locationId * @returns {Promise} */ - async setLocationId(locationId) { + setLocationId(locationId) { this.state.locationId = locationId; - await this.env.services.rpc({ + this.env.services.rpc({ route: "/lunch/user_location_set", params: { context: this.env.session.user_context, @@ -71,9 +71,9 @@ odoo.define("lunch/static/src/js/lunch_model_extension.js", function (require) { * @param {number} userId * @returns {Promise} */ - async updateUserId(userId) { + updateUserId(userId) { this.state.userId = userId; - await this._updateLocationId(); + this.shouldLoad = true; } //--------------------------------------------------------------------- |
