Atul Patel ac8c7febd3 [FIX] account: fixed tax name unique constraint error
due to the absence of IR model data entries for certain
account taxes, but with identical tax names, tax types,
and scopes, attempts to create standard taxes with the
same names alongside IR model data result in a constraint
violation, specifically, "tax name must be unique." To address
this constraint, we append "old" to the tax name for existing
taxes lacking IR model data entries.

see:
https://github.com/odoo/odoo/blob/740fb9ac8c8e121820feeac0e1f25a304e47da9d/addons/account/models/account_tax.py#L202

```
 File "/home/odoo/src/odoo/17.0/odoo/models.py", line 4864, in _create
    records._validate_fields(name for data in data_list for name in data['stored'])
  File "/home/odoo/src/odoo/17.0/odoo/models.py", line 1456, in _validate_fields
    check(self)
  File "/home/odoo/src/odoo/17.0/addons/account/models/account_tax.py", line 201, in _constrains_name
    raise ValidationError(
odoo.exceptions.ValidationError: Tax names must be unique!
```

closes odoo/odoo#161146

X-original-commit: 87e13a0f29ace57f1fd591d7180a64bb085a3bca
Signed-off-by: William André (wan) <wan@odoo.com>
2024-04-10 08:17:54 +00:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%