summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-03-26 08:56:17 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-06-08 08:15:06 +0000
commit95324638c7ccff46bc8215dcd089fb14e66c2695 (patch)
tree83185fbf7260b6914648affec6f2bd0a66a050b1 /addons
parent1c522ee778b520a215963922f5b17d2790c31907 (diff)
[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>
Diffstat (limited to 'addons')
-rw-r--r--addons/product/models/res_company.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product/models/res_company.py b/addons/product/models/res_company.py
index 5a44de1afc1..06004a38a0b 100644
--- a/addons/product/models/res_company.py
+++ b/addons/product/models/res_company.py
@@ -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: