From 05c007df00c24fffff16521e1699cc389b1bf4d0 Mon Sep 17 00:00:00 2001 From: dhr-odoo <dhr@tinyerp.com> Date: Fri, 13 Jun 2014 18:01:57 +0530 Subject: [PATCH] Resolved the traceback in Events > Ticket Type tab, when the product is removed --- addons/event_sale/event_sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py index ed99e6a39cc6..69ad0cb6af6a 100644 --- a/addons/event_sale/event_sale.py +++ b/addons/event_sale/event_sale.py @@ -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): -- GitLab