dont reset company on deleting company transactions

This commit is contained in:
Nabin Hait 2015-06-02 17:29:21 +05:30
parent c87595b2da
commit 030ade428b

View File

@ -27,12 +27,7 @@ def delete_for_doctype(doctype, company_name):
company_fieldname = meta.get("fields", {"fieldtype": "Link",
"options": "Company"})[0].fieldname
if meta.issingle:
single = frappe.get_doc(doctype, doctype)
single.set(company_fieldname, "")
single.flags.ignore_mandatory = True
single.save()
else:
if not meta.issingle:
if not meta.istable:
# delete children
for df in meta.get_table_fields():