[FIX] stock: do not set user_id on prepare_invoice_group

The user_id is already set by the prepare_invoice method, which is called before the prepare_invoice_group (the user_id is already set, thus)
Besides, _prepare_invoice is overriden in sale_stock, to set the picking sale order salesman as user_id, and, without this correct, grouping invoicse by partner re-set the user_id to uid, which is wrong.
This commit is contained in:
Denis Ledoux 2014-07-24 20:42:21 +02:00
parent 951a51df3f
commit a5531c1d29
1 changed files with 0 additions and 1 deletions

View File

@ -1011,7 +1011,6 @@ class stock_picking(osv.osv):
'origin': (invoice.origin or '') + ', ' + (picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
'comment': (comment and (invoice.comment and invoice.comment + "\n" + comment or comment)) or (invoice.comment and invoice.comment or ''),
'date_invoice': context.get('date_inv', False),
'user_id': uid,
}
def _prepare_invoice(self, cr, uid, picking, partner, inv_type, journal_id, context=None):