[IMP] base: display only company name in duplicate Tax ID warning
When creating a new company from a move, if the tax ID is repeated, a warning is displayed. The warning includes the company name, address and VAT, if those have been added. In this case, address is shown in an extra line, which looks broken. This commit removes additional partner information by updating the context, displaying only the partner name. It also slightly rewords the warning, from "are you sure to create a new one?" to "are you sure you want to create a new one?". To replicate the issue: 1. Create an invoice 2. Click on the empty field next to Customer, type a new name and click "Create and edit..." 3. Add a Tax ID that is already in use (e.g. US12345673) 4. Warning of duplicate Tax ID shows, displaying company name, address and VAT task-3829641 closes odoo/odoo#160373 Signed-off-by: Quentin De Paoli <qdp@odoo.com>
This commit is contained in:
@@ -167,10 +167,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partners">
|
||||
<div class="alert alert-warning oe_edit_only" role="alert" name="warning_tax" invisible="not same_vat_partner_id">
|
||||
A partner with the same <span><span class="o_vat_label">Tax ID</span></span> already exists (<field name="same_vat_partner_id"/>), are you sure to create a new one?
|
||||
A partner with the same <span><span class="o_vat_label">Tax ID</span></span> already exists (<field name="same_vat_partner_id" context="{'show_address': False, 'show_vat': False}"/>), are you sure to create a new one?
|
||||
</div>
|
||||
<div class="alert alert-warning oe_edit_only" role="alert" name="warning_company" invisible="not same_company_registry_partner_id">
|
||||
A partner with the same <span><span class="o_vat_label">Company Registry</span></span> already exists (<field name="same_company_registry_partner_id"/>), are you sure to create a new one?
|
||||
A partner with the same <span><span class="o_vat_label">Company Registry</span></span> already exists (<field name="same_company_registry_partner_id" context="{'show_address': False, 'show_vat': False}"/>), are you sure to create a new one?
|
||||
</div>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
|
||||
Reference in New Issue
Block a user