[item] default warehouse is selected with item

This commit is contained in:
Rushabh Mehta
2013-07-01 11:46:07 +05:30
parent b3f947aca6
commit 1bcc19e019
5 changed files with 27 additions and 6 deletions

View File

@@ -201,8 +201,8 @@ class DocType:
for a in accounts:
account_name = accounts[a] + " - " + self.doc.abbr
if not self.doc.fields[a] and webnotes.conn.exists("Account", account_name):
webnotes.conn.set(self.doc, account_name)
if not self.doc.fields.get(a) and webnotes.conn.exists("Account", account_name):
webnotes.conn.set(self.doc, a, account_name)
if not self.doc.stock_adjustment_cost_center:
webnotes.conn.set(self.doc, "stock_adjustment_cost_center", self.doc.cost_center)