From 49ac956b34df7fbe4b2c51fd981787c9967f28a0 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Wed, 29 May 2019 14:14:40 +0000 Subject: [PATCH] [FIX] point_of_sale: fix onchange pricelist Since ORM changes, the ids a many2many are new (virtual) ones in a onchange, so we have to point to origin which are the real records to check that the many2one is in as it has a real id. closes odoo/odoo#33763 Signed-off-by: pimodoo --- addons/point_of_sale/models/pos_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py index e87ee562d3a..7f634f6cd61 100644 --- a/addons/point_of_sale/models/pos_config.py +++ b/addons/point_of_sale/models/pos_config.py @@ -283,7 +283,7 @@ class PosConfig(models.Model): @api.onchange('available_pricelist_ids') def _onchange_available_pricelist_ids(self): - if self.pricelist_id not in self.available_pricelist_ids: + if self.pricelist_id not in self.available_pricelist_ids._origin: self.pricelist_id = False @api.onchange('is_posbox')