[minor] wnf refactor, fixes in demo

This commit is contained in:
Anand Doshi
2013-09-26 15:56:54 +05:30
parent 5b004ff8a7
commit f879a9dc2e
3 changed files with 18 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ class DocType:
if not webnotes.conn.get_value("Account", {"account_type": "Warehouse",
"master_name": self.doc.name}) and not webnotes.conn.get_value("Account",
{"account_name": self.doc.warehouse_name}):
if self.doc.__islocal or not webnotes.conn.get_value("Stock Ledger Entry",
if self.doc.fields.get("__islocal") or not webnotes.conn.get_value("Stock Ledger Entry",
{"warehouse": self.doc.name}):
self.validate_parent_account()
ac_bean = webnotes.bean({