Browse Source

[FIX] protect pricelist_id get to avoid error in tests in other modules if pos_pricelist is installed

pull/371/head
Sylvain LE GAL 5 years ago
parent
commit
a2c0ec2d7b
  1. 2
      pos_pricelist/models/point_of_sale.py

2
pos_pricelist/models/point_of_sale.py

@ -94,7 +94,7 @@ class PosOrder(models.Model):
@api.model
def _order_fields(self, ui_order):
res = super(PosOrder, self)._order_fields(ui_order)
res.update({'pricelist_id': ui_order['pricelist_id']})
res.update({'pricelist_id': ui_order.get('pricelist_id', False)})
return res
@api.model

Loading…
Cancel
Save