Skip to content
Snippets Groups Projects
Commit cd95dc1a authored by Martin Trigaux's avatar Martin Trigaux
Browse files

Merge pull request #522 from odoo-dev/saas-5-opw-609008-dhr

[FIX] event_sale: avoid traceback when remove product in onchange view
parents f15cbd65 05c007df
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,8 @@ class event_ticket(osv.osv):
]
def onchange_product_id(self, cr, uid, ids, product_id=False, context=None):
return {'value': {'price': self.pool.get("product.product").browse(cr, uid, product_id).list_price or 0}}
price = self.pool.get("product.product").browse(cr, uid, product_id).list_price if product_id else 0
return {'value': {'price': price}}
class event_registration(osv.osv):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment