From a5531c1d291786e76974e6bd6c2481fa5483e803 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 24 Jul 2014 20:42:21 +0200 Subject: [PATCH] [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. --- addons/stock/stock.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c14819f9f5f..d363275b7fa 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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):