[FIX] event: make invoice wizard now creates invoice line with better label
authorqdp <qdp-launchpad@tinyerp.com>
Fri, 26 Feb 2010 13:24:13 +0000 (14:24 +0100)
committerqdp <qdp-launchpad@tinyerp.com>
Fri, 26 Feb 2010 13:24:13 +0000 (14:24 +0100)
bzr revid: qdp-launchpad@tinyerp.com-20100226132413-x27mkprdhg9025n2

addons/event/wizard/make_invoice.py

index c41a074..ee21df2 100644 (file)
@@ -92,7 +92,7 @@ def _makeInvoices(self, cr, uid, data, context):
 
         vals = value['value']
         vals.update({
-            'name': reg.name,
+            'name': reg.invoice_label + '-' + reg.name,
             'price_unit': reg.unit_price,
             'quantity': reg.nb_register,
             'product_id':reg.event_id.product_id.id,
@@ -101,7 +101,6 @@ def _makeInvoices(self, cr, uid, data, context):
         inv_line_ids = obj_event_reg._create_invoice_lines(cr, uid, [reg.id], vals)
 
         inv = {
-            'name': reg.invoice_label,
             'origin': reg.invoice_label,
             'type': 'out_invoice',
             'reference': False,