diff options
| author | Sébastien Mottet (oms) <oms@odoo.com> | 2020-04-23 08:31:30 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-04-30 11:34:36 +0000 |
| commit | debeec1201d447b24674449cfaf6ebd94b4e41ae (patch) | |
| tree | d92dacdbe64e9e1560defb27435d63055ca1e89d /addons/mail | |
| parent | 8b6b09fc26dc35f57a68584a668940e1d8bde1ff (diff) | |
[IMP] mail, crm: add view types for crm.lead model when coming from activity menu
Purpose of this commit is to allow customization of view types available when
using the activity menu. By default only kanban, list and form are available
as before.
Calendar, pivot, graph and activity have been added for leads, allowing
better user experience in their use of activities.
Task ID: 2228451
Community PR odoo/odoo#50042
Enterprise PR odoo/enterprise#10145
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/static/src/js/systray/systray_activity_menu.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/systray/systray_activity_menu.js b/addons/mail/static/src/js/systray/systray_activity_menu.js index aada48357b5..98fd27dbbe4 100644 --- a/addons/mail/static/src/js/systray/systray_activity_menu.js +++ b/addons/mail/static/src/js/systray/systray_activity_menu.js @@ -60,6 +60,16 @@ var ActivityMenu = Widget.extend({ }); }, /** + * Return views to display when coming from systray depending on the model. + * + * @private + * @param {string} model + * @returns {Array[]} output the list of views to display. + */ + _getViewsList(model) { + return [[false, 'kanban'], [false, 'list'], [false, 'form']]; + }, + /** * Update(render) activity system tray view on activity updation. * @private */ @@ -155,7 +165,7 @@ var ActivityMenu = Widget.extend({ type: 'ir.actions.act_window', name: data.model_name, res_model: data.res_model, - views: [[false, 'kanban'], [false, 'list'], [false, 'form']], + views: this._getViewsList(data.res_model), search_view_id: [false], domain: domain, context:context, |
