Merge pull request #22203 from marination/account-tree

fix: Check for Company before rendering tree in Account Tree
This commit is contained in:
Deepesh Garg 2020-06-12 10:02:41 +05:30 committed by GitHub
commit ca97e19b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,9 @@ frappe.treeview_settings["Account"] = {
on_change: function() {
var me = frappe.treeview_settings['Account'].treeview;
var company = me.page.fields_dict.company.get_value();
if (!company) {
frappe.throw(__("Please set a Company"));
}
frappe.call({
method: "erpnext.accounts.doctype.account.account.get_root_company",
args: {