From 3330dcc20bb5edda33160aeadf92bf4eb95509d1 Mon Sep 17 00:00:00 2001 From: Jordi Esteve <> Date: Thu, 11 Aug 2011 15:30:15 +0530 Subject: [PATCH] [FIX] Purchase:Invoice is create when outgoing picking list from a sale order including service products lp bug: https://launchpad.net/bugs/737786 fixed bzr revid: aag@tinyerp.com-20110811100015-rpjxhqbg30qk8ss0 --- addons/purchase/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index 541db7331fe..d4732ef7a72 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -105,7 +105,7 @@ class stock_picking(osv.osv): return super(stock_picking, self)._get_taxes_invoice(cursor, user, move_line, type) def _get_account_analytic_invoice(self, cursor, user, picking, move_line): - if move_line.purchase_line_id: + if picking.purchase_id and move_line.purchase_line_id: return move_line.purchase_line_id.account_analytic_id.id return super(stock_picking, self)._get_account_analytic_invoice(cursor, user, picking, move_line)