[FIX] base: duplicate mandatory field while creating contact

Description of the issue/feature this PR addresses:
duplicate mandatory field in popup when save the contact record.

Current behavior before PR:
Its showing same field name twice in popup which asking invalid fields.

Desired behavior after PR is merged:
it should show 'name' field only once.

Fixes #79753

closes odoo/odoo#81727

X-original-commit: eb4b49e7078f4aa90f9d652de10386da38ded2dc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Aktiv Software
2021-12-21 12:55:05 +00:00
parent eb6810d1b5
commit c510df4201
+2 -2
View File
@@ -168,8 +168,8 @@
<field name="country_code" invisible="1"/>
<field name="company_type" widget="radio" options="{'horizontal': true}"/>
<h1>
<field id="company" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact')], 'invisible': [('is_company','=', False)]}"/>
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact')], 'invisible': [('is_company','=', True)]}"/>
<field id="company" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact'),('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact'), ('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
</h1>
<div class="o_row">
<field name="parent_id"