From 92183e59a72a2d13831896a7519ad8b35854e156 Mon Sep 17 00:00:00 2001 From: Julien Legros Date: Fri, 24 Oct 2014 17:57:08 +0200 Subject: [PATCH] [FIX] event_sale: event name carried over in invoice line --- addons/event_sale/event_sale.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py index 330deaca3da..270563cb385 100644 --- a/addons/event_sale/event_sale.py +++ b/addons/event_sale/event_sale.py @@ -62,6 +62,13 @@ class sale_order_line(osv.osv): 'event_ok': fields.related('product_id', 'event_ok', string='event_ok', type='boolean'), } + def _prepare_order_line_invoice_line(self, cr, uid, line, account_id=False, context=None): + res = super(sale_order_line, self)._prepare_order_line_invoice_line(cr, uid, line, account_id=account_id, context=context) + if line.event_id: + event = self.pool['event.event'].read(cr, uid, line.event_id.id, ['name'], context=context) + res['name'] = '%s: %s' % (res['name'], event['name']) + return res + def product_id_change(self, cr, uid, ids, pricelist, product,