summaryrefslogtreecommitdiff
path: root/addons/product
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-01-21 14:06:29 +0000
committerVictor Feyens <vfe@odoo.com>2020-04-16 08:36:03 +0000
commitd6893ae7277ba626c3383fbc3dbf4355b75386fc (patch)
tree10efaf6573c49fb7368d0c256145a392e7aa7842 /addons/product
parentf83ba90e9099f0ac8242d8acfe11391a67619fdf (diff)
[FIX] product,sale: When multi-currency is enabled, pricelists should also be enabled
Since https://github.com/odoo/odoo/commit/7d8df4bec192e5a2ff3341dcf43d59e06a57f9a9, the groups managing pricelists features have been updated. But the onchange feature enabling pricelist on multi-currency activation was wrongly adapted, it was only activating advanced pricelists, iff basic pricelists were enabled. The wanted feature is to activate pricelist (basic pricelist features: group_product_pricelist) when multi-currency is enabled. Also add an implied_group on multi_currency group to enforce this behavior. closes odoo/odoo#49633 X-original-commit: f862f9650395b02f6a43c57cdf232a309fa6948e Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons/product')
-rw-r--r--addons/product/models/res_config_settings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/product/models/res_config_settings.py b/addons/product/models/res_config_settings.py
index 96bbc88c5f9..e74e05fe781 100644
--- a/addons/product/models/res_config_settings.py
+++ b/addons/product/models/res_config_settings.py
@@ -52,8 +52,8 @@ class ResConfigSettings(models.TransientModel):
@api.onchange('group_multi_currency')
def _onchange_group_multi_currency(self):
- if self.group_product_pricelist and not self.group_sale_pricelist and self.group_multi_currency:
- self.group_sale_pricelist = True
+ if self.group_multi_currency:
+ self.group_product_pricelist = True
@api.onchange('group_product_pricelist')
def _onchange_group_sale_pricelist(self):