[IMP] sale_crm: show opportunity in sale order view
Before this commit, the field opportunity_id was only visible in debug mode in the sale.order form view. It was correctly pointing to opportunities but, when used to create new records, it was creating leads instead. The field is now always visible so users can link sale orders and opportunities and a context was added so that the field correctly creates opportunities instead of leads. Task-3039802 closes odoo/odoo#104123 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='technical']" position="inside">
|
||||
<field name="opportunity_id" help="Log in the chatter from which opportunity the order originates" groups="base.group_no_one"/>
|
||||
<field name="opportunity_id" context="{'default_type': 'opportunity'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user