fix: merge conflict

This commit is contained in:
Nabin Hait
2021-05-31 11:21:18 +05:30
104 changed files with 2251 additions and 1477 deletions

View File

@@ -90,12 +90,6 @@ frappe.ui.form.on("Company", {
frm.toggle_enable("default_currency", (frm.doc.__onload &&
!frm.doc.__onload.transactions_exist));
if (frm.has_perm('write')) {
frm.add_custom_button(__('Create Tax Template'), function() {
frm.trigger("make_default_tax_template");
});
}
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});
@@ -121,17 +115,21 @@ frappe.ui.form.on("Company", {
}
if (frm.has_perm('write')) {
frm.add_custom_button(__('Default Tax Template'), function() {
frm.add_custom_button(__('Create Tax Template'), function() {
frm.trigger("make_default_tax_template");
}, __('Create'));
}, __('Manage'));
}
if (frappe.user.has_role('System Manager')) {
if (frm.has_perm('write')) {
frm.add_custom_button(__('Delete Transactions'), function() {
frm.trigger("delete_company_transactions");
}, __('Manage'));
}
}
}
erpnext.company.set_chart_of_accounts_options(frm.doc);
if (!frappe.user.has_role('System Manager')) {
frm.get_field("delete_company_transactions").hide();
}
},
make_default_tax_template: function(frm) {
@@ -145,11 +143,6 @@ frappe.ui.form.on("Company", {
})
},
onload_post_render: function(frm) {
if(frm.get_field("delete_company_transactions").$input)
frm.get_field("delete_company_transactions").$input.addClass("btn-danger");
},
country: function(frm) {
erpnext.company.set_chart_of_accounts_options(frm.doc);
},

View File

@@ -99,7 +99,6 @@
"company_description",
"registration_info",
"registration_details",
"delete_company_transactions",
"lft",
"rgt",
"old_parent"
@@ -666,11 +665,6 @@
"oldfieldname": "registration_details",
"oldfieldtype": "Code"
},
{
"fieldname": "delete_company_transactions",
"fieldtype": "Button",
"label": "Delete Company Transactions"
},
{
"fieldname": "lft",
"fieldtype": "Int",
@@ -747,7 +741,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2021-02-16 15:53:37.167589",
"modified": "2021-05-07 03:11:28.189740",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",

View File

@@ -59,13 +59,15 @@ class GlobalDefaults(Document):
# Make property setters to hide rounded total fields
for doctype in ("Quotation", "Sales Order", "Sales Invoice", "Delivery Note",
"Supplier Quotation", "Purchase Order", "Purchase Invoice"):
"Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"):
make_property_setter(doctype, "base_rounded_total", "hidden", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
make_property_setter(doctype, "base_rounded_total", "print_hide", 1, "Check", validate_fields_for_doctype=False)
make_property_setter(doctype, "rounded_total", "hidden", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
make_property_setter(doctype, "rounded_total", "print_hide", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
make_property_setter(doctype, "disable_rounded_total", "default", cint(self.disable_rounded_total), "Text", validate_fields_for_doctype=False)
def toggle_in_words(self):
self.disable_in_words = cint(self.disable_in_words)