From ca630daf32e1c9aef97e2c2833d4e6137b773b46 Mon Sep 17 00:00:00 2001 From: "nel@tinyerp.com" <> Date: Tue, 8 Jun 2010 13:23:27 +0200 Subject: [PATCH] [IMP] stock: add condition if purchase or sale are not installed bzr revid: nel@tinyerp.com-20100608112327-4a58o09901e8z7ee --- addons/stock/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 87d8acf05f3..a6655352d86 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -848,9 +848,9 @@ class stock_picking(osv.osv): account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, partner.property_account_position, account_id) notes = False - if move_line.sale_line_id: + if ('sale_line_id' in move_line._columns.keys()) and move_line.sale_line_id: notes = move_line.sale_line_id.notes - elif move_line.purchase_line_id: + elif ('purchase_line_id' in move_line._columns.keys()) and move_line.purchase_line_id: notes = move_line.purchase_line_id.notes invoice_line_id = invoice_line_obj.create(cr, uid, {