[FIX] Sale : Passing customer ref. of picking to invoice

lp bug: https://launchpad.net/bugs/443132 fixed

bzr revid: jvo@tinyerp.com-20091119070917-b8p0hzgki08pyhij
This commit is contained in:
VRA(OpenERP)
2009-11-19 12:39:17 +05:30
committed by Jay (Open ERP)
parent ba6ab77a90
commit 7fc05f47d1
+7 -1
View File
@@ -131,13 +131,19 @@ class stock_picking(osv.osv):
for invoice in invoice_obj.browse(cursor, user, invoice_ids,
context=context):
invoices[invoice.id] = invoice
for picking in picking_obj.browse(cursor, user, picking_ids,
context=context):
if not picking.sale_id:
continue
sale_lines = picking.sale_id.order_line
invoice_created = invoices[result[picking.id]]
if picking.sale_id.client_order_ref:
inv_name = picking.sale_id.client_order_ref + " : " + invoice_created.name
invoice_obj.write(cursor, user, [invoice_created.id], {'name': inv_name}, context=context)
for sale_line in sale_lines:
if sale_line.product_id.type == 'service' and sale_line.invoiced == False:
if group: