From d0a892ffe7a8c87c2d4c785a176e955360cc9f1f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 22 Dec 2011 19:04:49 +0530 Subject: [PATCH] print hide price list flds --- .../receivable_voucher/receivable_voucher.txt | 34 ++++++++++++++-- erpnext/patches/print_hide_price_list.py | 3 ++ .../selling/doctype/quotation/quotation.txt | 39 ++++++++++++++++--- .../doctype/sales_order/sales_order.txt | 39 ++++++++++++++++--- .../doctype/delivery_note/delivery_note.txt | 28 +++++++++++-- 5 files changed, 125 insertions(+), 18 deletions(-) create mode 100644 erpnext/patches/print_hide_price_list.py diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt index 497c99febe4..c194e7cc0c7 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:18', 'docstatus': 0, - 'modified': '2011-12-20 18:23:36', + 'modified': '2011-12-22 19:04:07', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -34,13 +34,12 @@ 'server_code_error': ' ', 'show_in_menu': 0, 'subject': 'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding', - 'version': 391 + 'version': 392 }, # These values are common for all DocFormat { 'doctype': 'DocFormat', - 'format': 'POS Invoice', 'name': '__common__', 'parent': 'Receivable Voucher', 'parentfield': 'formats', @@ -126,7 +125,32 @@ # DocFormat { - 'doctype': 'DocFormat' + 'doctype': 'DocFormat', + 'format': 'POS Invoice' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'POS Invoice' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Invoice Classic' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Invoice Modern' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Invoice Spartan' }, # DocField @@ -477,6 +501,7 @@ 'label': 'Price List Currency', 'options': 'link:Currency', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, @@ -489,6 +514,7 @@ 'fieldtype': 'Currency', 'label': 'Price List Currency Conversion Rate', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, diff --git a/erpnext/patches/print_hide_price_list.py b/erpnext/patches/print_hide_price_list.py new file mode 100644 index 00000000000..833ab988085 --- /dev/null +++ b/erpnext/patches/print_hide_price_list.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("update `tabDocField` set print_hide = 1 where fieldname in ('price_list_currency', 'plc_conversion_rate')") diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt index 86b7b5f324e..ac58dc4db9a 100644 --- a/erpnext/selling/doctype/quotation/quotation.txt +++ b/erpnext/selling/doctype/quotation/quotation.txt @@ -5,11 +5,20 @@ { 'creation': '2010-08-08 17:09:17', 'docstatus': 0, - 'modified': '2011-12-20 14:01:09', + 'modified': '2011-12-22 19:03:04', 'modified_by': 'Administrator', 'owner': 'Administrator' }, + # These values are common for all DocField + { + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Quotation', + 'parentfield': 'fields', + 'parenttype': 'DocType' + }, + # These values are common for all DocType { '_last_update': '1322549700', @@ -32,15 +41,15 @@ 'show_in_menu': 0, 'subject': 'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s', 'tag_fields': 'status', - 'version': 597 + 'version': 598 }, - # These values are common for all DocField + # These values are common for all DocFormat { - 'doctype': 'DocField', + 'doctype': 'DocFormat', 'name': '__common__', 'parent': 'Quotation', - 'parentfield': 'fields', + 'parentfield': 'formats', 'parenttype': 'DocType' }, @@ -169,6 +178,24 @@ 'role': 'Maintenance User' }, + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Quotation Classic' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Quotation Modern' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Quotation Spartan' + }, + # DocField { 'colour': 'White:FFF', @@ -568,6 +595,7 @@ 'label': 'Price List Currency', 'options': 'link:Currency', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, @@ -580,6 +608,7 @@ 'fieldtype': 'Currency', 'label': 'Price List Currency Conversion Rate', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt index d59f236e5b2..2e6ea999663 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.txt +++ b/erpnext/selling/doctype/sales_order/sales_order.txt @@ -5,11 +5,20 @@ { 'creation': '2010-08-08 17:09:21', 'docstatus': 0, - 'modified': '2011-12-20 12:55:02', + 'modified': '2011-12-22 19:03:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, + # These values are common for all DocField + { + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Sales Order', + 'parentfield': 'fields', + 'parenttype': 'DocType' + }, + # These values are common for all DocType { '_last_update': '1324295218', @@ -29,15 +38,15 @@ 'show_in_menu': 0, 'subject': 'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed', 'tag_fields': 'delivery_status,billing_status', - 'version': 608 + 'version': 609 }, - # These values are common for all DocField + # These values are common for all DocFormat { - 'doctype': 'DocField', + 'doctype': 'DocFormat', 'name': '__common__', 'parent': 'Sales Order', - 'parentfield': 'fields', + 'parentfield': 'formats', 'parenttype': 'DocType' }, @@ -166,6 +175,24 @@ 'role': 'Maintenance User' }, + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Order Classic' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Order Modern' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Sales Order Spartan' + }, + # DocField { 'colour': 'White:FFF', @@ -581,6 +608,7 @@ 'label': 'Price List Currency', 'options': 'link:Currency', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, @@ -593,6 +621,7 @@ 'fieldtype': 'Currency', 'label': 'Price List Currency Conversion Rate', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt index dc905f569d9..5340955e675 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.txt +++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt @@ -5,7 +5,7 @@ { 'creation': '2011-04-18 15:58:20', 'docstatus': 0, - 'modified': '2011-12-20 13:23:33', + 'modified': '2011-12-22 19:03:44', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -37,13 +37,12 @@ 'show_in_menu': 0, 'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed', 'tag_fields': 'billing_status', - 'version': 459 + 'version': 460 }, # These values are common for all DocFormat { 'doctype': 'DocFormat', - 'format': 'Delivery Note Packing List Wise', 'name': '__common__', 'parent': 'Delivery Note', 'parentfield': 'formats', @@ -143,7 +142,26 @@ # DocFormat { - 'doctype': 'DocFormat' + 'doctype': 'DocFormat', + 'format': 'Delivery Note Packing List Wise' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Delivery Note Classic' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Delivery Note Modern' + }, + + # DocFormat + { + 'doctype': 'DocFormat', + 'format': 'Delivery Note Spartan' }, # DocField @@ -567,6 +585,7 @@ 'label': 'Price List Currency', 'options': 'link:Currency', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 }, @@ -579,6 +598,7 @@ 'fieldtype': 'Currency', 'label': 'Price List Currency Conversion Rate', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1 },