From a2c0ec2d7bdefb6b1dc858e496db21361ef3798c Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Wed, 27 Mar 2019 17:05:33 +0100 Subject: [PATCH] [FIX] protect pricelist_id get to avoid error in tests in other modules if pos_pricelist is installed --- pos_pricelist/models/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_pricelist/models/point_of_sale.py b/pos_pricelist/models/point_of_sale.py index 418f8ae2..659a0a39 100644 --- a/pos_pricelist/models/point_of_sale.py +++ b/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