Skip to content
Snippets Groups Projects
Commit eda10ddc authored by ijas ahammed's avatar ijas ahammed Committed by Thibault Delavallée
Browse files

[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#76567

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 1d7589af
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,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([]),
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment