diff options
| author | Martin Geubelle <mge@odoo.com> | 2018-12-13 20:21:23 +0000 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2018-12-13 20:21:23 +0000 |
| commit | b0b9d028a63a7f076c12c88cf8b85075a2c64693 (patch) | |
| tree | 6b330287e0f9792761436b270c2646c988606fcd /addons/web/static/src | |
| parent | 8fe7229e1984811f3456dbf502cb03fba879e180 (diff) | |
[FIX] web: handle `context` key in calendar reload
When filtering the calendar view on search filters, the filter `context`
was not taken into account during the reload.
For example, in the Calendar app, the filter 'My Meetings' has a `context`
{'mymeetings': 1} which was not passed to `search_read`.
Task 1917628
closes odoo/odoo#29531
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_model.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_model.js b/addons/web/static/src/js/views/calendar/calendar_model.js index f7a9e40e4ce..5316cb24206 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -236,17 +236,18 @@ return AbstractModel.extend({ this.setDate(this.data.target_date.clone().add(-1, this.data.scale)); }, /** - * @todo: this should not work. it ignores the domain/context - * * @override - * @param {any} _handle ignored - * @param {any} _params ignored ? really ? + * @param {Object} [params.context] + * @param {Array} [params.domain] * @returns {Deferred} */ - reload: function (_handle, params) { + reload: function (handle, params) { if (params.domain) { this.data.domain = params.domain; } + if (params.context) { + this.data.context = params.context; + } return this._loadCalendar(); }, /** |
