[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
This commit is contained in:
Lucas Perais (lpe)
2017-08-09 11:09:35 +02:00
parent a31820d0cb
commit 3d119c44f3
+1 -1
View File
@@ -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