mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
[fix] [minor] create default warehouse on saving of company if not exists
This commit is contained in:
@@ -59,12 +59,13 @@ class DocType:
|
|||||||
|
|
||||||
def create_default_warehouses(self):
|
def create_default_warehouses(self):
|
||||||
for whname in ("Stores", "Work In Progress", "Finished Goods"):
|
for whname in ("Stores", "Work In Progress", "Finished Goods"):
|
||||||
webnotes.bean({
|
if not webnotes.conn.exists("Warehouse", whname + " - " + self.doc.abbr):
|
||||||
"doctype":"Warehouse",
|
webnotes.bean({
|
||||||
"warehouse_name": whname,
|
"doctype":"Warehouse",
|
||||||
"company": self.doc.name,
|
"warehouse_name": whname,
|
||||||
"create_account_under": "Stock Assets - " + self.doc.abbr
|
"company": self.doc.name,
|
||||||
}).insert()
|
"create_account_under": "Stock Assets - " + self.doc.abbr
|
||||||
|
}).insert()
|
||||||
|
|
||||||
def create_default_web_page(self):
|
def create_default_web_page(self):
|
||||||
if not webnotes.conn.get_value("Website Settings", None, "home_page"):
|
if not webnotes.conn.get_value("Website Settings", None, "home_page"):
|
||||||
|
|||||||
Reference in New Issue
Block a user