From f28bef868db05c1482f6534ef9950a90caf7fc51 Mon Sep 17 00:00:00 2001 From: Frappe ERPnext Date: Wed, 2 Sep 2020 21:42:52 +0200 Subject: [PATCH] feat: Checkbox for activation of printing UOM after quantity Checkbox will be added to Frappe after installation of ERPNext. (Print Settings docType is part of frappe app, not erpnext app) --- erpnext/setup/install.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 4f0f5721c2..2225fe169f 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -20,6 +20,7 @@ def after_install(): frappe.get_doc({'doctype': "Role", "role_name": "Analytics"}).insert() set_single_defaults() create_compact_item_print_custom_field() + create_print_uom_after_qty_custom_field() create_print_zero_amount_taxes_custom_field() add_all_roles_to("Administrator") create_default_cash_flow_mapper_templates() @@ -66,6 +67,16 @@ def create_compact_item_print_custom_field(): }) +def create_print_uom_after_qty_custom_field(): + create_custom_field('Print Settings', { + 'label': _('Print UOM after Quantity'), + 'fieldname': 'print_uom_after_quantity', + 'fieldtype': 'Check', + 'default': 0, + 'insert_after': 'compact_item_print' + }) + + def create_print_zero_amount_taxes_custom_field(): create_custom_field('Print Settings', { 'label': _('Print taxes with zero amount'),