From 2f5b93e308446f0842c413cf9e2c2eb1d9de0d42 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 13:01:40 +0530 Subject: [PATCH] fix(cheque_print_template): print format creation from cheque print template requires system manager (backport #55708) (#55711) Co-authored-by: Diptanil Saha fix(cheque_print_template): print format creation from cheque print template requires system manager (#55708) --- .../cheque_print_template.js | 14 +- .../cheque_print_template.json | 1346 ++++------------- .../cheque_print_template.py | 2 + .../address_and_contacts.py | 1 - erpnext/templates/pages/projects.py | 1 + 5 files changed, 304 insertions(+), 1060 deletions(-) diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js index 17cb8d00e48..7ce14b6c235 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js @@ -6,12 +6,14 @@ frappe.provide("erpnext.cheque_print"); frappe.ui.form.on("Cheque Print Template", { refresh: function (frm) { if (!frm.doc.__islocal) { - frm.add_custom_button( - frm.doc.has_print_format ? __("Update Print Format") : __("Create Print Format"), - function () { - erpnext.cheque_print.view_cheque_print(frm); - } - ).addClass("btn-primary"); + if (frappe.user.has_role("System Manager")) { + frm.add_custom_button( + frm.doc.has_print_format ? __("Update Print Format") : __("Create Print Format"), + function () { + erpnext.cheque_print.view_cheque_print(frm); + } + ).addClass("btn-primary"); + } $(frm.fields_dict.cheque_print_preview.wrapper).empty(); diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json index e9993c34268..155fc43c5f7 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json @@ -1,1102 +1,342 @@ { - "allow_copy": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:bank_name", - "beta": 0, - "creation": "2016-05-04 14:35:00.402544", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", + "actions": [], + "allow_bulk_edit": 1, + "autoname": "field:bank_name", + "creation": "2016-05-04 14:35:00.402544", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "settings", + "has_print_format", + "primary_settings", + "bank_name", + "cheque_size", + "starting_position_from_top_edge", + "cheque_width", + "cheque_height", + "scanned_cheque", + "column_break_5", + "is_account_payable", + "acc_pay_dist_from_top_edge", + "acc_pay_dist_from_left_edge", + "message_to_show", + "date_and_payer_settings", + "date_settings", + "date_dist_from_top_edge", + "date_dist_from_left_edge", + "payer_settings", + "payer_name_from_top_edge", + "payer_name_from_left_edge", + "amount_in_words_and_figure_settings", + "html_19", + "amt_in_words_from_top_edge", + "amt_in_words_from_left_edge", + "amt_in_word_width", + "amt_in_words_line_spacing", + "amount_in_figure", + "amt_in_figures_from_top_edge", + "amt_in_figures_from_left_edge", + "account_number_and_signatory_settings", + "account_no_settings", + "acc_no_dist_from_top_edge", + "acc_no_dist_from_left_edge", + "signatory_position", + "signatory_from_top_edge", + "signatory_from_left_edge", + "preview", + "cheque_print_preview" + ], "fields": [ { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "description": "", - "fieldname": "settings", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "", - "length": 0, - "no_copy": 0, - "options": "
\n

All dimensions in centimeter only

\n
", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "settings", + "fieldtype": "HTML", + "options": "
\n

All dimensions in centimeter only

\n
" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "has_print_format", - "fieldtype": "Check", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Has Print Format", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "0", + "fieldname": "has_print_format", + "fieldtype": "Check", + "hidden": 1, + "label": "Has Print Format", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "primary_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Primary Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "primary_settings", + "fieldtype": "Section Break", + "label": "Primary Settings" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "bank_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Bank Name", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "bank_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Bank Name", + "no_copy": 1, + "reqd": 1, + "unique": 1 + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "Regular", - "fieldname": "cheque_size", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Cheque Size", - "length": 0, - "no_copy": 0, - "options": "\nRegular\nA4", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "Regular", + "fieldname": "cheque_size", + "fieldtype": "Select", + "label": "Cheque Size", + "options": "\nRegular\nA4" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "depends_on": "eval:doc.cheque_size==\"A4\"", - "fieldname": "starting_position_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting position from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "depends_on": "eval:doc.cheque_size==\"A4\"", + "fieldname": "starting_position_from_top_edge", + "fieldtype": "Float", + "label": "Starting position from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "20.00", - "fieldname": "cheque_width", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Cheque Width", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "20.00", + "fieldname": "cheque_width", + "fieldtype": "Float", + "label": "Cheque Width", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "9.00", - "fieldname": "cheque_height", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Cheque Height", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "9.00", + "fieldname": "cheque_height", + "fieldtype": "Float", + "label": "Cheque Height", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "", - "fieldname": "scanned_cheque", - "fieldtype": "Attach", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Scanned Cheque", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "scanned_cheque", + "fieldtype": "Attach", + "label": "Scanned Cheque" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "column_break_5", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "column_break_5", + "fieldtype": "Column Break" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "1", - "fieldname": "is_account_payable", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Is Account Payable", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "1", + "fieldname": "is_account_payable", + "fieldtype": "Check", + "label": "Is Account Payable" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "1.00", - "depends_on": "eval:doc.is_account_payable", - "fieldname": "acc_pay_dist_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "1.00", + "depends_on": "eval:doc.is_account_payable", + "fieldname": "acc_pay_dist_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "9.00", - "depends_on": "eval:doc.is_account_payable", - "fieldname": "acc_pay_dist_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "9.00", + "depends_on": "eval:doc.is_account_payable", + "fieldname": "acc_pay_dist_from_left_edge", + "fieldtype": "Float", + "label": "Distance from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "Acc. Payee", - "depends_on": "eval:doc.is_account_payable", - "fieldname": "message_to_show", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Message to show", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "Acc. Payee", + "depends_on": "eval:doc.is_account_payable", + "fieldname": "message_to_show", + "fieldtype": "Data", + "label": "Message to show" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "date_and_payer_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "date_and_payer_settings", + "fieldtype": "Section Break" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "date_settings", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Date Settings", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "date_settings", + "fieldtype": "HTML", + "label": "Date Settings", + "options": "" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "1.00", - "fieldname": "date_dist_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "1.00", + "fieldname": "date_dist_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "15.00", - "depends_on": "", - "fieldname": "date_dist_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "15.00", + "fieldname": "date_dist_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "payer_settings", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Payer Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "payer_settings", + "fieldtype": "Column Break", + "label": "Payer Settings" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "2.00", - "fieldname": "payer_name_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "2.00", + "fieldname": "payer_name_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "3.00", - "fieldname": "payer_name_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "3.00", + "fieldname": "payer_name_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "amount_in_words_and_figure_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "amount_in_words_and_figure_settings", + "fieldtype": "Section Break" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "html_19", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "html_19", + "fieldtype": "HTML", + "options": "" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "3.00", - "fieldname": "amt_in_words_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "3.00", + "fieldname": "amt_in_words_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "4.00", - "fieldname": "amt_in_words_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "4.00", + "fieldname": "amt_in_words_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "15.00", - "fieldname": "amt_in_word_width", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Width of amount in word", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "15.00", + "fieldname": "amt_in_word_width", + "fieldtype": "Float", + "label": "Width of amount in word", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "0.50", - "fieldname": "amt_in_words_line_spacing", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Line spacing for amount in words", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "0.50", + "fieldname": "amt_in_words_line_spacing", + "fieldtype": "Float", + "label": "Line spacing for amount in words", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "amount_in_figure", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Amount In Figure", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "amount_in_figure", + "fieldtype": "Column Break", + "label": "Amount In Figure" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "3.50", - "fieldname": "amt_in_figures_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "3.50", + "fieldname": "amt_in_figures_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "16.00", - "fieldname": "amt_in_figures_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "16.00", + "fieldname": "amt_in_figures_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "account_number_and_signatory_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "account_number_and_signatory_settings", + "fieldtype": "Section Break" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "account_no_settings", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "account_no_settings", + "fieldtype": "HTML", + "options": "" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "5.00", - "fieldname": "acc_no_dist_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "5.00", + "fieldname": "acc_no_dist_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "4.00", - "fieldname": "acc_no_dist_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "4.00", + "fieldname": "acc_no_dist_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "signatory_position", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Signatory Position", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "signatory_position", + "fieldtype": "Column Break", + "label": "Signatory Position" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "6.00", - "fieldname": "signatory_from_top_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Distance from top edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "6.00", + "fieldname": "signatory_from_top_edge", + "fieldtype": "Float", + "label": "Distance from top edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "15.00", - "fieldname": "signatory_from_left_edge", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Starting location from left edge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "2", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "15.00", + "fieldname": "signatory_from_left_edge", + "fieldtype": "Float", + "label": "Starting location from left edge", + "precision": "2" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "preview", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Preview", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "preview", + "fieldtype": "Section Break", + "label": "Preview" + }, { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "cheque_print_preview", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 + "fieldname": "cheque_print_preview", + "fieldtype": "HTML" } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 1, - "modified": "2016-06-23 20:19:11.694932", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Cheque Print Template", - "name_case": "", - "owner": "Administrator", + ], + "links": [], + "max_attachments": 1, + "modified": "2026-06-08 12:10:35.829531", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Cheque Print Template", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, "write": 1 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, "write": 1 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_seen": 0 -} \ No newline at end of file + ], + "row_format": "Dynamic", + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py index 4b1394ede17..258ea7bb8d7 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py @@ -48,6 +48,8 @@ class ChequePrintTemplate(Document): @frappe.whitelist() def create_or_update_cheque_print_format(template_name): + frappe.only_for("System Manager") + if not frappe.db.exists("Print Format", template_name): cheque_print = frappe.new_doc("Print Format") cheque_print.update( diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index 0b08a24484f..ed25dd5f153 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -20,7 +20,6 @@ field_map = { } - def execute(filters=None): columns, data = get_columns(filters), get_data(filters) return columns, data diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index 22750d39aea..8f153105e3e 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -88,6 +88,7 @@ def get_timesheets(project, start=0, search=None): timesheet.update(info[0]) return timesheets + def get_attachments(project): return frappe.get_all( "File",