diff options
| author | Raphael Collet <rco@odoo.com> | 2019-05-31 14:35:21 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-06-03 12:37:39 +0000 |
| commit | b415da5daacd51e1fec39b29a91ce2a715b0f193 (patch) | |
| tree | aad23cc373f353249733c99632a356ec2e3785fc /addons/portal/controllers | |
| parent | 0d88571faae0627e316c96cfb0e8f58f9aebd3c5 (diff) | |
[IMP] fields: add method to get a usable domain from a field
closes odoo/odoo#33816
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/portal/controllers')
| -rw-r--r-- | addons/portal/controllers/mail.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/portal/controllers/mail.py b/addons/portal/controllers/mail.py index e9603edbaa9..39e83703a3c 100644 --- a/addons/portal/controllers/mail.py +++ b/addons/portal/controllers/mail.py @@ -126,9 +126,9 @@ class PortalChatter(http.Controller): domain = [] # Only search into website_message_ids, so apply the same domain to perform only one search # extract domain from the 'website_message_ids' field - field_domain = request.env[res_model]._fields['website_message_ids'].domain - if callable(field_domain): - field_domain = field_domain(request.env[res_model]) + model = request.env[res_model] + field = model._fields['website_message_ids'] + field_domain = field.get_domain_list(model) domain = expression.AND([domain, field_domain, [('res_id', '=', res_id)]]) # Check access |
