From 3d119c44f3e3f9cdff178b0441d03b3c0b193904 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 9 Aug 2017 11:01:34 +0200 Subject: [PATCH] [FIX] point_of_sale: correct inheriting from pos_order_line being an issue Before this commit, when creating a pos_order_line_pro_forma, which inherits from pos_order_line but in a different table, the create confused an overriden field (order_id) When pos_blackbox was installed, pro forma lines would search for an pos_order instead of a pos_order_proforma upon their creation This commit allows an inheritant of pos_order_line to use the super.create function OPW 745685 Closes #18755 --- addons/point_of_sale/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 5da48b11878..7e94c36ff31 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1572,7 +1572,7 @@ class pos_order_line(osv.osv): def create(self, values): if values.get('order_id') and not values.get('name'): # set name based on the sequence specified on the config - config_id = self.env['pos.order'].browse(values['order_id']).session_id.config_id.id + config_id = self.order_id.browse(values['order_id']).session_id.config_id.id # HACK: sequence created in the same transaction as the config # cf TODO master is pos.config create # remove me saas-15