fix: allow standard print formats for reports
This commit is contained in:
parent
653ae1e47a
commit
f265da9caa
3 changed files with 1 additions and 4 deletions
|
|
@ -72,7 +72,6 @@ frappe.ui.form.on("Print Format", {
|
||||||
},
|
},
|
||||||
print_format_for: function (frm) {
|
print_format_for: function (frm) {
|
||||||
if (frm.doc.print_format_for === "Report") {
|
if (frm.doc.print_format_for === "Report") {
|
||||||
frm.set_value("standard", "No");
|
|
||||||
frm.set_value("custom_format", 1);
|
frm.set_value("custom_format", 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@
|
||||||
"oldfieldname": "standard",
|
"oldfieldname": "standard",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes",
|
"options": "No\nYes",
|
||||||
"read_only_depends_on": "eval:doc.print_format_for === \"Report\";",
|
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
|
|
@ -294,7 +293,7 @@
|
||||||
"icon": "fa fa-print",
|
"icon": "fa fa-print",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2026-02-11 13:17:55.662780",
|
"modified": "2026-03-26 16:27:02.559100",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Printing",
|
"module": "Printing",
|
||||||
"name": "Print Format",
|
"name": "Print Format",
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ class PrintFormat(Document):
|
||||||
def before_save(self):
|
def before_save(self):
|
||||||
if self.print_format_for == "Report":
|
if self.print_format_for == "Report":
|
||||||
self.custom_format = 1
|
self.custom_format = 1
|
||||||
self.standard = "No"
|
|
||||||
|
|
||||||
def get_html(self, docname, letterhead=None):
|
def get_html(self, docname, letterhead=None):
|
||||||
return get_html(self.doc_type, docname, self.name, letterhead)
|
return get_html(self.doc_type, docname, self.name, letterhead)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue