From a5e9e066b27163fa7cce65d33fab5cc609150980 Mon Sep 17 00:00:00 2001 From: Remi <remi@le-filament.com> Date: Tue, 10 Dec 2019 09:22:13 +0100 Subject: [PATCH] Force domain on parent_id --- views/res_partner.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/res_partner.xml b/views/res_partner.xml index 46c9fcb..3cbbbf7 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -41,7 +41,9 @@ <label for="parent_id" string="Société" attrs="{'invisible': ['|', '&', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/> </field> <field name="parent_id" position="attributes"> - <attribute name="options" >{'no_create': True}</attribute> + <attribute name="options">{'no_open': True, 'no_create': True}</attribute> + <attribute name="domain">[('is_company', '=', True)]</attribute> + <attribute name="placeholder">Société</attribute> </field> <xpath expr="//div[hasclass('oe_title')]" position="attributes"> <attribute name="class">oe_title oe_title_cgscop</attribute> -- GitLab