[IMP] sale_crm: prefill opportunity fields on creation
With this commit, partner information and utm fields are pre-filled when creating an opportunity from the many2one `opportunity_id` in `sale.order`. Task-3442793 closes odoo/odoo#133904 X-original-commit: fb70b749e655a22ff038dff06f6317d34381d33d Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
This commit is contained in:
@@ -15,7 +15,15 @@
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='origin']" position="after">
|
||||
<field name="opportunity_id" context="{'default_type': 'opportunity'}"/>
|
||||
<field name="opportunity_id" context="{
|
||||
'default_campaign_id': campaign_id,
|
||||
'default_company_id': company_id,
|
||||
'default_medium_id': medium_id,
|
||||
'default_partner_id': partner_id,
|
||||
'default_source_id': source_id,
|
||||
'default_tag_ids': tag_ids,
|
||||
'default_type': 'opportunity',
|
||||
}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user