diff options
| author | Mitali Patel <mpa@odoo.com> | 2019-06-14 09:52:03 +0000 |
|---|---|---|
| committer | Mitali Patel <mpa@odoo.com> | 2019-06-20 10:48:23 +0000 |
| commit | 80c0bc00a72093879dac93e6c09ea45d3e3e9533 (patch) | |
| tree | 052a3d86ab59fc9b620b0ee9feed074371e069b8 /addons | |
| parent | 5a345af6df4187e8468259b98515d2266db61fde (diff) | |
[IMP] mail: removed messages from custom filter
Purpose of this commit is filter that allows to
filter by messages is not working properly so
removed messages filter from custom filter menu
task-1939953 closes-#34141
closes odoo/odoo#34141
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail/static/src/js/filter_menu.js | 16 | ||||
| -rw-r--r-- | addons/mail/views/mail_templates.xml | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/filter_menu.js b/addons/mail/static/src/js/filter_menu.js new file mode 100644 index 00000000000..dbf2428bda9 --- /dev/null +++ b/addons/mail/static/src/js/filter_menu.js @@ -0,0 +1,16 @@ +odoo.define('mail.FilterMenu', function (require) { +"use strict"; + +var FilterMenu = require('web.FilterMenu'); + +FilterMenu.include({ + init: function () { + this._super.apply(this, arguments); + //remove messages from custom filters + this.fields = _.pick(this.fields, function (field, name) { + return field.relation !== 'mail.message' && name !== 'message_ids'; + }); + }, +}); + +}); diff --git a/addons/mail/views/mail_templates.xml b/addons/mail/views/mail_templates.xml index 15cd3f50e60..5bfd9884670 100644 --- a/addons/mail/views/mail_templates.xml +++ b/addons/mail/views/mail_templates.xml @@ -69,6 +69,8 @@ <script type="text/javascript" src="/mail/static/src/js/user_menu.js"></script> <!-- tools --> <script type="text/javascript" src="/mail/static/src/js/tools/debug_manager.js"></script> + <!-- filter menu --> + <script type="text/javascript" src="/mail/static/src/js/filter_menu.js"></script> <!-- utils --> <script type="text/javascript" src="/mail/static/src/js/utils.js"></script> <script type="text/javascript" src="/mail/static/src/js/activity.js"></script> |
