[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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user