Skip to content

Commit 18ab52d

Browse files
committed
[FIX] base: Change contact address label depending on type
What are the steps to reproduce your issue ? 1. Create new contact 2. Set compagnie type as Individual 3. Set address type as Contact What is currently happening ? Address label is shown as "Company Address" What are you expecting to happen ? Show "Address" in case of Individual company type opw-2504878 closes odoo#71618 X-original-commit: 0248f17 Signed-off-by: Nicolas Lempereur (nle) <[email protected]> Signed-off-by: Achraf <[email protected]>
1 parent a1047b4 commit 18ab52d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

odoo/addons/base/views/res_partner_views.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@
182182
<group>
183183
<field name="type" groups="base.group_no_one" attrs="{'invisible': [('is_company','=', True)], 'readonly': [('user_ids', '!=', [])]}"/>
184184
<span class="o_form_label o_td_label" name="address_name">
185-
<b attrs="{'invisible': [('type', '!=', 'contact')]}">Company Address</b>
186-
<b attrs="{'invisible': [('type', '!=', 'invoice')]}">Invoice Address</b>
187-
<b attrs="{'invisible': [('type', '!=', 'delivery')]}">Delivery Address</b>
188-
<b attrs="{'invisible': [('type', '!=', 'other')]}">Other Address</b>
189-
<b attrs="{'invisible': [('type', '!=', 'private')]}">Private Address</b>
190-
<b attrs="{'invisible': [('type', '!=', False)]}">Address</b>
185+
<b attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}">Company Address</b>
186+
<b attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'invoice')]}">Invoice Address</b>
187+
<b attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'delivery')]}">Delivery Address</b>
188+
<b attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'other')]}">Other Address</b>
189+
<b attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'private')]}">Private Address</b>
190+
<b attrs="{'invisible': ['&amp;', ('parent_id', '!=', False), ('type', '!=', False)]}">Address</b>
191191
</span>
192192
<div class="o_address_format">
193193
<field name="street" placeholder="Street..." class="o_address_street"

0 commit comments

Comments
 (0)