summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/project/views/project_views.xml2
-rw-r--r--addons/sale_project/views/project_task_views.xml4
2 files changed, 5 insertions, 1 deletions
diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml
index 843418ff4c9..e2d8db23535 100644
--- a/addons/project/views/project_views.xml
+++ b/addons/project/views/project_views.xml
@@ -670,7 +670,7 @@
</group>
<group>
<field name="active" invisible="1"/>
- <field name="partner_id" class="o_task_customer_field"/>
+ <field name="partner_id" widget="res_partner_many2one" class="o_task_customer_field"/>
<field name="partner_email" widget="email" invisible="1"/>
<field name="partner_phone" widget="phone" attrs="{'invisible': [('partner_id', '=', False)]}"/>
<field name="legend_blocked" invisible="1"/>
diff --git a/addons/sale_project/views/project_task_views.xml b/addons/sale_project/views/project_task_views.xml
index 436eeb0b020..6cb6eb36b28 100644
--- a/addons/sale_project/views/project_task_views.xml
+++ b/addons/sale_project/views/project_task_views.xml
@@ -26,6 +26,10 @@
string="Sales Order"
groups="sales_team.group_sale_salesman"/>
</div>
+ <xpath expr="//field[@name='partner_id']" position="attributes">
+ <attribute name="options">{'always_reload': True}</attribute>
+ <attribute name="context">{'res_partner_search_mode': 'customer'}</attribute>
+ </xpath>
<xpath expr="//field[@name='partner_phone']" position="after">
<field name="sale_order_id" attrs="{'invisible': [('project_id', '!=', False)]}" groups="sales_team.group_sale_salesman"/>
<field name="sale_line_id" string="Sales Order Item" attrs="{'invisible': [('partner_id', '=', False)]}" options='{"no_open": True}' readonly="1" context="{'create': False, 'edit': False, 'delete': False}" groups="sales_team.group_sale_salesman"/>