[FIX] product: on CoA choose do not create pricelist if already present
Create a new company with it's currency A default price list has been created for this company in this currency Install the "customizable Chart of Account" under the settings tab, Accounting By installing this CoA, Odoo creates a new pricelist, in Dollars, that overwrites the one in the currency of the country. Avoid creating the new pricelist if there is already a pricelist for the current company in the company currency opw-2221854 closes odoo/odoo#52429 X-original-commit: dc0d6af54f56bf6e576013d67cf44b5cd3608351 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -38,7 +38,7 @@ class ResCompany(models.Model):
|
||||
for company in self:
|
||||
existing_pricelist = ProductPricelist.search(
|
||||
[('company_id', 'in', (False, company.id)),
|
||||
('currency_id', '=', currency_id)])
|
||||
('currency_id', 'in', (currency_id, company.currency_id.id))])
|
||||
if existing_pricelist:
|
||||
continue
|
||||
if currency_id == company.currency_id.id:
|
||||
|
||||
Reference in New Issue
Block a user