[IMP] crm: set filter on customer field
-In crm_lead_to_opportunity_view.xml and crm_lead_view.xml, added domain and context in partner_id field to filter on customer
This commit is contained in:
committed by
Yannick Tivisse
parent
8124e9f9f9
commit
bb818cad05
@@ -409,8 +409,8 @@
|
||||
<group>
|
||||
<field name="partner_id"
|
||||
on_change="on_change_partner_id(partner_id)"
|
||||
string="Customer"
|
||||
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
|
||||
string="Customer" domain="[('customer', '=', True)]"
|
||||
context="{'default_name': partner_name, 'search_default_customer': 1, 'default_email': email_from, 'default_phone': phone}"/>
|
||||
<field name="email_from" string="Email" widget="email"/>
|
||||
<field name="phone" widget="phone"/>
|
||||
</group>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<group name="action" attrs="{'invisible': [('name', '!=', 'convert')]}" string="Customers" col="1">
|
||||
<field name="action" nolabel="1" widget="radio" on_change="onchange_action(action, context)" />
|
||||
<group col="2">
|
||||
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"/>
|
||||
<field name="partner_id" domain="[('customer', '=', True)]" context="{'search_default_customer': 1}" attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
|
||||
Reference in New Issue
Block a user