[FIX] event_sale: do not crash when empty field product in ticket types lines

This commit is contained in:
FalcoBolger
2014-07-10 11:26:19 +02:00
committed by Martin Trigaux
parent 1ddb3439be
commit 44bf56c77c
+2
View File
@@ -224,6 +224,8 @@ class event_ticket(osv.osv):
]
def onchange_product_id(self, cr, uid, ids, product_id=False, context=None):
if not product_id:
return {'value': {}}
return {'value': {'price': self.pool.get("product.product").browse(cr, uid, product_id).list_price or 0}}