diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-12-15 10:46:40 +0100 |
|---|---|---|
| committer | Xavier BOL (xbo) <xbo@odoo.com> | 2020-12-21 15:35:20 +0100 |
| commit | c247ce57e62181ca50930d76ba2134220d3dce42 (patch) | |
| tree | 188fe55fb477f86fb6188de36763155f98344992 /addons | |
| parent | 393769b1445bd5d310cd434144a770094b430f00 (diff) | |
[IMP] project,sale_project: have partner_id many2One behave as in sale.order
Prior to this commit the partners where sorted out by display_name in the project
form view.
After this commit the will be sorted out by their ranking, as it is the case
in sale.order form view.
task-2409761
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/project/views/project_views.xml | 2 | ||||
| -rw-r--r-- | addons/sale_project/views/project_task_views.xml | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 3613446676f..0b8f1e2df6d 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -294,7 +294,7 @@ <group> <field name="active" invisible="1"/> <field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]"/> - <field name="partner_id" string="Customer"/> + <field name="partner_id" string="Customer" widget="res_partner_many2one"/> <field name="partner_phone" widget="phone" attrs="{'invisible': [('partner_id', '=', False)]}"/> <field name="partner_email" widget="email" diff --git a/addons/sale_project/views/project_task_views.xml b/addons/sale_project/views/project_task_views.xml index 69049599c0b..f8a76907ef3 100644 --- a/addons/sale_project/views/project_task_views.xml +++ b/addons/sale_project/views/project_task_views.xml @@ -13,6 +13,18 @@ </field> </record> + <record id="view_edit_project_inherit_form" model="ir.ui.view"> + <field name="name">project.project.view.inherit</field> + <field name="model">project.project</field> + <field name="inherit_id" ref="project.edit_project"/> + <field name="arch" type="xml"> + <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> + </field> + </record> + <record id="view_sale_project_inherit_form" model="ir.ui.view"> <field name="name">project.task.view.inherit</field> <field name="model">project.task</field> |
