diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-02-28 11:48:00 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 5804ed100ec790a36c5ff30a217914950cd78098 (patch) | |
| tree | a9f7ecf403cc8682c52ecce354ba082e9dee1a7c /addons/mail/static/src/js/chat_manager.js | |
| parent | e5740270568404d71a3bc093074a085c9c2eded8 (diff) | |
[IMP] web, *: compute contexts and domains from datapoint
This commit tries to refactore the management of contexts and domains
in the webclient.
- Get rid of CompoundDomain: use standard array manipulation to
join multiple domains or use the Domain class (to be improved)
- Get rid of data.js build_domain and build_context methods
- Link this.record to the data point from the basic model for all
fields (not only relational fields)
- Add a getContext and a getDomain function to the basic model
data point (localData element) so that AbstractField implementations
can use them thanks to their this.record element.
- Remove the autocontext binding for field RPCs (see FieldManagerMixin)
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index 709ff965df9..2fa1c6dd2d2 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -6,7 +6,6 @@ var utils = require('mail.utils'); var config = require('web.config'); var Bus = require('web.Bus'); var core = require('web.core'); -var data = require('web.data'); var session = require('web.session'); var time = require('web.time'); var web_client = require('web.web_client'); @@ -669,11 +668,11 @@ var ChatManager = Class.extend(Mixins.EventDispatcherMixin, Mixins.ServicesMixi var cache = get_channel_cache(channel, options.domain); if (options.domain) { - domain = new data.CompoundDomain(domain, options.domain || []).eval(); + domain = domain.concat(options.domain || []); } if (options.load_more) { var min_message_id = cache.messages[0].id; - domain = new data.CompoundDomain([['id', '<', min_message_id]], domain).eval(); + domain = [['id', '<', min_message_id]].concat(domain); } return this.rpc('mail.message', 'message_fetch') |
