Patch fix
This commit is contained in:
parent
9911309631
commit
24ee7e5eb1
@ -19,6 +19,7 @@ def execute():
|
|||||||
|
|
||||||
companies = frappe.get_all("Company")
|
companies = frappe.get_all("Company")
|
||||||
if len(companies) == 1:
|
if len(companies) == 1:
|
||||||
|
try:
|
||||||
frappe.db.sql('''
|
frappe.db.sql('''
|
||||||
INSERT INTO `tabItem Default`
|
INSERT INTO `tabItem Default`
|
||||||
(name, parent, parenttype, parentfield, idx, company, default_warehouse,
|
(name, parent, parenttype, parentfield, idx, company, default_warehouse,
|
||||||
@ -29,6 +30,8 @@ def execute():
|
|||||||
buying_cost_center, selling_cost_center, expense_account, income_account, default_supplier
|
buying_cost_center, selling_cost_center, expense_account, income_account, default_supplier
|
||||||
FROM `tabItem`;
|
FROM `tabItem`;
|
||||||
''', companies[0].name)
|
''', companies[0].name)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
item_details = frappe.get_all("Item", fields=["name", "default_warehouse", "buying_cost_center",
|
item_details = frappe.get_all("Item", fields=["name", "default_warehouse", "buying_cost_center",
|
||||||
"expense_account", "selling_cost_center", "income_account"], limit=100)
|
"expense_account", "selling_cost_center", "income_account"], limit=100)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user