[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 <pimodoo@users.noreply.github.com>
This commit is contained in:
Pierre Masereel
2019-05-29 14:14:40 +00:00
parent 5f02ae443f
commit 49ac956b34
+1 -1
View File
@@ -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')