Skip to content

Commit

Permalink
Merge pull request frappe#45195 from sokumon/coa-ui
Browse files Browse the repository at this point in the history
fix: coa actions cleanup
  • Loading branch information
ruthra-kumar authored Jan 10, 2025
2 parents 31005c5 + 108a91d commit 856ec08
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions erpnext/accounts/doctype/account/account_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ frappe.treeview_settings["Account"] = {
fieldtype: "Select",
options: erpnext.utils.get_tree_options("company"),
label: __("Company"),
render_on_toolbar: true,
default: erpnext.utils.get_tree_default("company"),
on_change: function () {
var me = frappe.treeview_settings["Account"].treeview;
Expand Down Expand Up @@ -182,39 +183,22 @@ frappe.treeview_settings["Account"] = {
function () {
frappe.set_route("Tree", "Cost Center", { company: get_company() });
},
__("View")
__("View"),
"default",
true
);

treeview.page.add_inner_button(
__("Opening Invoice Creation Tool"),
function () {
frappe.set_route("Form", "Opening Invoice Creation Tool", { company: get_company() });
},
__("View")
__("View"),
"default",
true
);

treeview.page.add_inner_button(
__("Period Closing Voucher"),
function () {
frappe.set_route("List", "Period Closing Voucher", { company: get_company() });
},
__("View")
);

treeview.page.add_inner_button(
__("Journal Entry"),
function () {
frappe.new_doc("Journal Entry", { company: get_company() });
},
__("Create")
);
treeview.page.add_inner_button(
__("Company"),
function () {
frappe.new_doc("Company");
},
__("Create")
);
treeview.page.add_divider_to_button_group(__("View"));

// financial statements
for (let report of [
Expand All @@ -231,7 +215,7 @@ frappe.treeview_settings["Account"] = {
function () {
frappe.set_route("query-report", report, { company: get_company() });
},
__("Financial Statements")
__("View")
);
}
},
Expand Down

0 comments on commit 856ec08

Please sign in to comment.