diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-25 14:57:24 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-25 14:57:24 +0200 |
| commit | 693f8dc68add34663f798370b4aea305f573f16d (patch) | |
| tree | dbd47871d9412317dc96fd4ba349196badab199c /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | c7a6409fac80a2d33006ab56fe40d27f2acd2cfd (diff) | |
| parent | 7bfde6e05d12be959d04f4842237bfcc05f3c93f (diff) | |
[MERGE] forward port branch saas-16 up to 7bfde6e05d1
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 | 8 |
1 files changed, 8 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 1df118ecfd9..f3b23bdab7a 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -1092,6 +1092,9 @@ var BasicModel = AbstractModel.extend({ * @param {boolean} [options.doNotSetDirty=false] if this flag is set to * true, then we will not tag the record as dirty. This should be avoided * for most situations. + * @param {boolean} [options.notifyChange=true] if this flag is set to + * false, then we will not notify and not trigger the onchange, even though + * it was changed. * @param {string} [options.viewType] current viewType. If not set, we will assume * main viewType from the record * @returns {Deferred} @@ -1119,6 +1122,10 @@ var BasicModel = AbstractModel.extend({ } } + if (options.notifyChange === false) { + return $.when(); + } + return $.when.apply($, defs).then(function () { var onChangeFields = []; // the fields that have changed and that have an on_change for (var fieldName in changes) { @@ -2305,6 +2312,7 @@ var BasicModel = AbstractModel.extend({ var ids = record.data[fieldName] || []; var list = self._makeDataPoint({ count: ids.length, + context: record.context, fieldsInfo: fieldsInfo, fields: view ? view.fields : fieldInfo.relatedFields, limit: fieldInfo.limit, |
