[FIX] website_crm_partner_assign: hide activity types of other models
Right now when editing the opportunity, all the activity types are listed in the drop-down, even those which are specific to other models. After this commit while editing the opportunity, we now display only activity types which are either specific for 'crm.lead', or those which are not linked with any models (common for all). TaskId-2443894 closes odoo/odoo#77924 X-original-commit: eda10ddcacdcb016c1282252d3b65dc37c934221 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Thibault Delavallée
parent
f56d11e45b
commit
76f5e41bca
@@ -164,7 +164,7 @@ class WebsiteAccount(CustomerPortal):
|
||||
'opportunity': opp,
|
||||
'user_activity': opp.sudo().activity_ids.filtered(lambda activity: activity.user_id == request.env.user)[:1],
|
||||
'stages': request.env['crm.stage'].search([('is_won', '!=', True)], order='sequence desc, name desc, id desc'),
|
||||
'activity_types': request.env['mail.activity.type'].sudo().search([]),
|
||||
'activity_types': request.env['mail.activity.type'].sudo().search(['|', ('res_model_id.model', '=', opp._name), ('res_model_id', '=', False)]),
|
||||
'states': request.env['res.country.state'].sudo().search([]),
|
||||
'countries': request.env['res.country'].sudo().search([]),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user