[fixes] nested set fix for warehouse, tree for accounts and cost center

This commit is contained in:
Saurabh
2016-06-06 14:22:37 +05:30
parent 0e47bfeb16
commit 554f6f70aa
7 changed files with 105 additions and 32 deletions

View File

@@ -87,7 +87,7 @@ class Company(Document):
.format(self.country.lower()))(self)
def create_default_warehouses(self):
for wh_detail in [{"warehouse_name": _("Warehouses"), "is_group": "Yes"},
for wh_detail in [
{"warehouse_name": _("Stores"), "is_group": "No"},
{"warehouse_name": _("Work In Progress"), "is_group": "No"},
{"warehouse_name": _("Finished Goods"), "is_group": "No"}]:
@@ -101,8 +101,7 @@ class Company(Document):
"warehouse_name": wh_detail["warehouse_name"],
"is_group": wh_detail["is_group"],
"company": self.name,
"parent_warehouse": "" if wh_detail["is_group"] == "Yes" \
else "{0} - {1}".format(_("Warehouses"), self.abbr),
"parent_warehouse": "",
"create_account_under": stock_group
})
warehouse.flags.ignore_permissions = True