mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
Print Settings for printing taxes with zero amount (#10782)
* Print Settings for printing taxes with zero amount * added __init__.py file to patch module v8_9
This commit is contained in:
committed by
Makarand Bauskar
parent
bf8e331135
commit
45dce89cae
@@ -5,6 +5,8 @@ from __future__ import print_function, unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
|
||||
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
|
||||
|
||||
default_mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via
|
||||
<a style="color: #888" href="http://erpnext.org">ERPNext</a></div>"""
|
||||
@@ -13,7 +15,7 @@ def after_install():
|
||||
frappe.get_doc({'doctype': "Role", "role_name": "Analytics"}).insert()
|
||||
set_single_defaults()
|
||||
create_compact_item_print_custom_field()
|
||||
from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
|
||||
create_print_zero_amount_taxes_custom_field()
|
||||
add_all_roles_to("Administrator")
|
||||
frappe.db.commit()
|
||||
|
||||
@@ -44,11 +46,19 @@ def set_single_defaults():
|
||||
frappe.db.set_default("date_format", "dd-mm-yyyy")
|
||||
|
||||
def create_compact_item_print_custom_field():
|
||||
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
|
||||
create_custom_field('Print Settings', {
|
||||
'label': _('Compact Item Print'),
|
||||
'fieldname': 'compact_item_print',
|
||||
'fieldtype': 'Check',
|
||||
'default': 1,
|
||||
'insert_after': 'with_letterhead'
|
||||
})
|
||||
|
||||
def create_print_zero_amount_taxes_custom_field():
|
||||
create_custom_field('Print Settings', {
|
||||
'label': _('Print taxes with zero amount'),
|
||||
'fieldname': 'print_taxes_with_zero_amount',
|
||||
'fieldtype': 'Check',
|
||||
'default': 0,
|
||||
'insert_after': 'allow_print_for_cancelled'
|
||||
})
|
||||
Reference in New Issue
Block a user