mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui
This commit is contained in:
@@ -90,29 +90,41 @@ frappe.ui.form.on("Company", {
|
||||
frm.toggle_enable("default_currency", (frm.doc.__onload &&
|
||||
!frm.doc.__onload.transactions_exist));
|
||||
|
||||
frm.add_custom_button(__('Create Tax Template'), function() {
|
||||
frm.trigger("make_default_tax_template");
|
||||
});
|
||||
if (frm.has_perm('write')) {
|
||||
frm.add_custom_button(__('Create Tax Template'), function() {
|
||||
frm.trigger("make_default_tax_template");
|
||||
});
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Cost Centers'), function() {
|
||||
frappe.set_route('Tree', 'Cost Center', {'company': frm.doc.name})
|
||||
}, __("View"));
|
||||
if (frappe.perm.has_perm("Cost Center", 0, 'read')) {
|
||||
frm.add_custom_button(__('Cost Centers'), function() {
|
||||
frappe.set_route('Tree', 'Cost Center', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Chart of Accounts'), function() {
|
||||
frappe.set_route('Tree', 'Account', {'company': frm.doc.name})
|
||||
}, __("View"));
|
||||
if (frappe.perm.has_perm("Account", 0, 'read')) {
|
||||
frm.add_custom_button(__('Chart of Accounts'), function() {
|
||||
frappe.set_route('Tree', 'Account', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Sales Tax Template'), function() {
|
||||
frappe.set_route('List', 'Sales Taxes and Charges Template', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
if (frappe.perm.has_perm("Sales Taxes and Charges Template", 0, 'read')) {
|
||||
frm.add_custom_button(__('Sales Tax Template'), function() {
|
||||
frappe.set_route('List', 'Sales Taxes and Charges Template', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Purchase Tax Template'), function() {
|
||||
frappe.set_route('List', 'Purchase Taxes and Charges Template', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
if (frappe.perm.has_perm("Purchase Taxes and Charges Template", 0, 'read')) {
|
||||
frm.add_custom_button(__('Purchase Tax Template'), function() {
|
||||
frappe.set_route('List', 'Purchase Taxes and Charges Template', {'company': frm.doc.name});
|
||||
}, __("View"));
|
||||
}
|
||||
|
||||
frm.add_custom_button(__('Default Tax Template'), function() {
|
||||
frm.trigger("make_default_tax_template");
|
||||
}, __('Create'));
|
||||
if (frm.has_perm('write')) {
|
||||
frm.add_custom_button(__('Default Tax Template'), function() {
|
||||
frm.trigger("make_default_tax_template");
|
||||
}, __('Create'));
|
||||
}
|
||||
}
|
||||
|
||||
erpnext.company.set_chart_of_accounts_options(frm.doc);
|
||||
|
||||
@@ -27,7 +27,8 @@ def delete_company_transactions(company_name):
|
||||
if doctype not in ("Account", "Cost Center", "Warehouse", "Budget",
|
||||
"Party Account", "Employee", "Sales Taxes and Charges Template",
|
||||
"Purchase Taxes and Charges Template", "POS Profile", "BOM",
|
||||
"Company", "Bank Account"):
|
||||
"Company", "Bank Account", "Item Tax Template", "Mode Of Payment",
|
||||
"Item Default"):
|
||||
delete_for_doctype(doctype, company_name)
|
||||
|
||||
# reset company values
|
||||
|
||||
Reference in New Issue
Block a user