From 87eb4b99a8a6eb548d32944f5794b6219af4e4fe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Sep 2013 17:03:31 +0530 Subject: [PATCH] [fix] [minor] gl entries for purchase invoice --- accounts/doctype/purchase_invoice/purchase_invoice.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py index ca2c5b17c3b..2b84564d5ee 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -355,10 +355,8 @@ class DocType(BuyingController): # item gl entries stock_item_and_auto_accounting_for_stock = False stock_items = self.get_stock_items() - warehouse_account = self.get_warehouse_account() for item in self.doclist.get({"parentfield": "entries"}): - if auto_accounting_for_stock and item.item_code in stock_items \ - and warehouse_account.get(item.warehouse): + if auto_accounting_for_stock and item.item_code in stock_items: if flt(item.valuation_rate): # if auto inventory accounting enabled and stock item, # then do stock related gl entries