From e28b9ce4ca2dfdfa392068276a17164f5fd9635a Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Wed, 6 May 2020 08:58:36 +0000 Subject: [PATCH] [FIX] website_sale: pricelist multi company When modifying the company_id of a pricelist, the check to ensure a website has a pricelist available wasn't triggered. This commit ensures the check is done in this case, to avoid the absence of any pricelist for a given website (which breaks /shop). Fixes #50707 closes odoo/odoo#50760 X-original-commit: 911ada2d02b24778435fd9174441a6834da2effa Signed-off-by: Victor Feyens (vfe) --- addons/website_sale/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index aaa235707a5..8ab4bed09d3 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -54,7 +54,7 @@ class ProductPricelist(models.Model): def write(self, data): res = super(ProductPricelist, self).write(data) - if data.keys() & {'code', 'active', 'website_id', 'selectable'}: + if data.keys() & {'code', 'active', 'website_id', 'selectable', 'company_id'}: self._check_website_pricelist() self.clear_cache() return res