Skip to content
Snippets Groups Projects
Commit 31468888 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] stock_account: avoid duplicate document origin in invoice

This fix is related to 8de7be62

opw-621962
parent 28833f07
Branches
Tags
No related merge requests found
......@@ -292,7 +292,8 @@ class stock_picking(osv.osv):
invoices[key] = invoice_id
else:
invoice = invoice_obj.browse(cr, uid, invoices[key], context=context)
invoice.write({'origin': '%s, %s' % (invoice.origin, invoice_vals['origin'],)})
if invoice_vals['origin'] not in invoice.origin.split(', '):
invoice.write({'origin': '%s, %s' % (invoice.origin, invoice_vals['origin'],)})
invoice_line_vals = move_obj._get_invoice_line_vals(cr, uid, move, partner, inv_type, context=context)
invoice_line_vals['invoice_id'] = invoices[key]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment