[FIX] crm: correctly set default_partner_id when creating opportunities from contact form view
This commit fixes a missing default_partner_id in context of 'Opportunities' stat button on contact form. It allows to immediately link a new opportunity to the contact we came from. Task ID-2343221 closes odoo/odoo#58722 X-original-commit: 77d4ba222630fa0f97351186782d09d2ec59a42a Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Thibault Delavallée
parent
cd288bd1d9
commit
db76ed28cd
@@ -33,7 +33,8 @@
|
||||
<button class="oe_stat_button o_res_partner_tip_opp" type="object"
|
||||
name="action_view_opportunity"
|
||||
icon="fa-star"
|
||||
groups="sales_team.group_sale_salesman">
|
||||
groups="sales_team.group_sale_salesman"
|
||||
context="{'default_partner_id': active_id}">
|
||||
<field string="Opportunities" name="opportunity_count" widget="statinfo"/>
|
||||
</button>
|
||||
<button class="oe_stat_button" type="object"
|
||||
|
||||
Reference in New Issue
Block a user