fieldname changed in features setup and required patch
diff --git a/patches/patch.py b/patches/patch.py
index 3b2bb3e..8177e87 100644
--- a/patches/patch.py
+++ b/patches/patch.py
@@ -1,7 +1,7 @@
# REMEMBER to update this
# ========================
-last_patch = 370
+last_patch = 371
#-------------------------------------------
@@ -361,6 +361,21 @@
elif patch_no == 370:
sql("update `tabDocField` set `hidden` = 0 where fieldname = 'group_or_ledger' and parent = 'Cost Center'")
elif patch_no == 371:
+ reload_doc('setup', 'doctype','features_setup')
+ flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_serial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos']
+
+ for f in flds:
+ val = sql("select value from tabSingles where field = '%s' and doctype = 'Features Setup'" % f)
+ val = val and val[0][0] or 0
+ sql("update `tabSingles` set value = %s where field = '%s' and doctype = 'Features Setup'" % (val, '__'+f))
+
+ st = "'"+"', '".join(flds)+"'"
+ sql("delete from `tabSingles` where field in (%s) and doctype = 'Features Setup'" % st)
+ sql("delete from `tabDefaultValue` where defkey in (%s) and parent = 'Control Panel'" % st)
+
+ get_obj('Features Setup', 'Features Setup').doc.save()
+
+ elif patch_no == 372:
comp = sql("select name from tabCompany where docstatus!=2")
fy = sql("select name from `tabFiscal Year` order by year_start_date asc")
for c in comp:
diff --git a/setup/doctype/features_setup/features_setup.txt b/setup/doctype/features_setup/features_setup.txt
index 224d175..b43a8eb 100644
--- a/setup/doctype/features_setup/features_setup.txt
+++ b/setup/doctype/features_setup/features_setup.txt
@@ -3,17 +3,18 @@
# These values are common in all dictionaries
{
- 'creation': '2011-08-25 16:53:56',
+ 'creation': '2011-09-07 11:59:05',
'docstatus': 0,
- 'modified': '2011-08-31 15:05:53',
+ 'modified': '2011-09-30 19:49:12',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1314783102',
+ '_last_update': '1317365120',
'colour': 'White:FFF',
+ 'default_print_format': 'Standard',
'doctype': 'DocType',
'issingle': 1,
'module': 'Setup',
@@ -21,7 +22,7 @@
'name_case': 'Title Case',
'section_style': 'Simple',
'show_in_menu': 1,
- 'version': 16
+ 'version': 19
},
# These values are common for all DocField
@@ -77,7 +78,7 @@
'colour': 'White:FFF',
'description': 'To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.',
'doctype': 'DocField',
- 'fieldname': 'item_searial_nos',
+ 'fieldname': '__item_searial_nos',
'fieldtype': 'Check',
'label': 'Item Serial Nos'
},
@@ -87,7 +88,7 @@
'colour': 'White:FFF',
'description': 'To track items in sales and purchase documents with batch nos<br><b>Preferred Industry: Chemicals etc</b>',
'doctype': 'DocField',
- 'fieldname': 'item_batch_nos',
+ 'fieldname': '__item_batch_nos',
'fieldtype': 'Check',
'label': 'Item Batch Nos'
},
@@ -97,7 +98,7 @@
'colour': 'White:FFF',
'description': 'To track brand name in the following documents<br>\nDelivery Note, Enuiry, Indent, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Receivable Voucher, Sales BOM, Sales Order, Serial No',
'doctype': 'DocField',
- 'fieldname': 'brands',
+ 'fieldname': '__brands',
'fieldtype': 'Check',
'label': 'Brands'
},
@@ -113,7 +114,7 @@
'colour': 'White:FFF',
'description': '1. To maintain the customer wise item code and to make them searchable based on their code use this option',
'doctype': 'DocField',
- 'fieldname': 'item_advanced',
+ 'fieldname': '__item_advanced',
'fieldtype': 'Check',
'label': 'Item Advanced'
},
@@ -123,7 +124,7 @@
'colour': 'White:FFF',
'description': 'If Sale BOM is defined, the actual BOM of the Pack is displayed as table.\nAvailable in Delivery Note and Sales Order',
'doctype': 'DocField',
- 'fieldname': 'packing_details',
+ 'fieldname': '__packing_details',
'fieldtype': 'Check',
'label': 'Packing Detials'
},
@@ -133,7 +134,7 @@
'colour': 'White:FFF',
'description': 'To get Item Group in details table',
'doctype': 'DocField',
- 'fieldname': 'item_group_in_details',
+ 'fieldname': '__item_group_in_details',
'fieldtype': 'Check',
'label': 'Item Groups in Details'
},
@@ -150,7 +151,7 @@
'colour': 'White:FFF',
'description': 'All export related fields like currency, conversion rate, export total, export grand total etc are available in <br>\nDelivery Note, POS, Quotation, Sales Invoice, Sales Order etc.',
'doctype': 'DocField',
- 'fieldname': 'exports',
+ 'fieldname': '__exports',
'fieldtype': 'Check',
'label': 'Exports'
},
@@ -160,7 +161,7 @@
'colour': 'White:FFF',
'description': 'All import related fields like currency, conversion rate, import total, import grand total etc are available in <br>\nPurchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.',
'doctype': 'DocField',
- 'fieldname': 'imports',
+ 'fieldname': '__imports',
'fieldtype': 'Check',
'label': 'Imports'
},
@@ -176,7 +177,7 @@
'colour': 'White:FFF',
'description': 'Field available in Delivery Note, Quotation, Receivable Voucher, Sales Order',
'doctype': 'DocField',
- 'fieldname': 'discounts',
+ 'fieldname': '__discounts',
'fieldtype': 'Check',
'label': 'Discounts'
},
@@ -186,7 +187,7 @@
'colour': 'White:FFF',
'description': 'To track any installation or commissioning related work after sales',
'doctype': 'DocField',
- 'fieldname': 'after_sales_installations',
+ 'fieldname': '__after_sales_installations',
'fieldtype': 'Check',
'label': 'After Sale Installations'
},
@@ -195,7 +196,7 @@
{
'description': 'Available in \nBill Of Materials, Delivery Note, Payable Voucher, Production Order, Purchase Order, Purchase Receipt, Receivable Voucher, Sales Order, Stock Entry, Timesheet',
'doctype': 'DocField',
- 'fieldname': 'projects',
+ 'fieldname': '__projects',
'fieldtype': 'Check',
'label': 'Projects'
},
@@ -205,7 +206,7 @@
'colour': 'White:FFF',
'description': 'If you have Sales Team and Sale Partners (Channel Partners) they can be tagged and maintain their contribution in the sales activity',
'doctype': 'DocField',
- 'fieldname': 'sales_extras',
+ 'fieldname': '__sales_extras',
'fieldtype': 'Check',
'label': 'Sales Extras'
},
@@ -222,7 +223,7 @@
'colour': 'White:FFF',
'description': 'If you involve in manufacturing activity<br>\nEnables item <b>Is Manufactured</b>',
'doctype': 'DocField',
- 'fieldname': 'manufacturing',
+ 'fieldname': '__manufacturing',
'fieldtype': 'Check',
'label': 'Manufacturing'
},
@@ -238,7 +239,7 @@
'colour': 'White:FFF',
'description': 'If you follow Quality Inspection<br>\nEnables item QA Required and QA No in Purchase Receipt',
'doctype': 'DocField',
- 'fieldname': 'quality',
+ 'fieldname': '__quality',
'fieldtype': 'Check',
'label': 'Quality'
},
@@ -248,7 +249,7 @@
'colour': 'White:FFF',
'description': 'To enable <b>Point of Sale</b> features',
'doctype': 'DocField',
- 'fieldname': 'pos',
+ 'fieldname': '__pos',
'fieldtype': 'Check',
'label': 'Point of Sale'
},
@@ -265,7 +266,7 @@
'colour': 'White:FFF',
'description': 'If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page',
'doctype': 'DocField',
- 'fieldname': 'page_break',
+ 'fieldname': '__page_break',
'fieldtype': 'Check',
'label': 'Page Break'
},
@@ -281,8 +282,8 @@
'colour': 'White:FFF',
'description': 'Enables <b>More Info.</b> in all documents',
'doctype': 'DocField',
- 'fieldname': 'more_info',
+ 'fieldname': '__more_info',
'fieldtype': 'Check',
'label': 'More Info'
}
-]
\ No newline at end of file
+]
diff --git a/startup/startup.js b/startup/startup.js
index 942f4ef..6199c77 100644
--- a/startup/startup.js
+++ b/startup/startup.js
@@ -552,7 +552,7 @@
}
// ====================================================================*/
pscript.feature_dict = {
- 'projects': {
+ '__projects': {
'Bill Of Materials': {'fields':['project_name']},
'Delivery Note': {'fields':['project_name']},
'Payable Voucher': {'fields':['project_name']},
@@ -564,17 +564,17 @@
'Stock Entry': {'fields':['project_name']},
'Timesheet': {'timesheet_details':['project_name']}
},
- 'packing_details': {
+ '__packing_details': {
'Delivery Note': {'fields':['packing_details','print_packing_slip'],'delivery_note_details':['no_of_packs','pack_gross_wt','pack_nett_wt','pack_no','pack_unit']},
'Sales Order': {'fields':['packing_details']}
},
- 'discounts': {
+ '__discounts': {
'Delivery Note': {'delivery_note_details':['adj_rate']},
'Quotation': {'quotation_details':['adj_rate']},
'Receivable Voucher': {'entries':['adj_rate']},
'Sales Order': {'sales_order_details':['adj_rate','ref_rate']}
},
- 'brands': {
+ '__brands': {
'Delivery Note': {'delivery_note_details':['brand']},
'Indent': {'indent_details':['brand']},
'Item': {'fields':['brand']},
@@ -586,10 +586,10 @@
'Sales Order': {'sales_order_details':['brand']},
'Serial No': {'fields':['brand']}
},
- 'after_sales_installations': {
+ '__after_sales_installations': {
'Delivery Note': {'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}
},
- 'item_batch_nos': {
+ '__item_batch_nos': {
'Delivery Note': {'delivery_note_details':['batch_no']},
'Item': {'fields':['has_batch_no']},
'Purchase Receipt': {'purchase_receipt_details':['batch_no']},
@@ -599,7 +599,7 @@
'Stock Entry': {'mtn_details':['batch_no']},
'Stock Ledger Entry': {'fields':['batch_no']}
},
- 'item_serial_nos': {
+ '__item_serial_nos': {
'Customer Issue': {'fields':['serial_no']},
'Delivery Note': {'delivery_note_details':['serial_no'],'packing_details':['serial_no']},
'Installation Note': {'installed_item_details':['serial_no']},
@@ -613,7 +613,7 @@
'Stock Entry': {'mtn_details':['serial_no']},
'Stock Ledger Entry': {'fields':['serial_no']}
},
- 'item_group_in_details': {
+ '__item_group_in_details': {
'Delivery Note': {'delivery_note_details':['item_group']},
'Enquiry': {'enquiry_details':['item_group']},
'Indent': {'indent_details':['item_group']},
@@ -631,7 +631,7 @@
'Sales Person': {'target_details':['item_group']},
'Territory': {'target_details':['item_group']}
},
- 'page_break': {
+ '__page_break': {
'Delivery Note': {'delivery_note_details':['page_break'],'packing_details':['page_break']},
'Indent': {'indent_details':['page_break']},
'Purchase Order': {'po_details':['page_break']},
@@ -641,7 +641,7 @@
'Receivable Voucher': {'entries':['page_break']},
'Sales Order': {'sales_order_details':['page_break']}
},
- 'exports': {
+ '__exports': {
'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','export_amount','export_rate']},
'POS Setting': {'fields':['conversion_rate','currency']},
'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','export_amount','export_rate']},
@@ -650,16 +650,16 @@
'Sales BOM': {'fields':['currency']},
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','export_amount','export_rate']}
},
- 'imports': {
+ '__imports': {
'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['import_amount','import_rate']},
'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['import_amount','import_rate']},
'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['import_amount','import_rate']},
'Supplier Quotation': {'fields':['conversion_rate','currency']}
},
- 'item_advanced': {
+ '__item_advanced': {
'Item': {'fields':['item_customer_details']}
},
- 'sales_extras': {
+ '__sales_extras': {
'Address': {'fields':['sales_partner']},
'Contact': {'fields':['sales_partner']},
'Customer': {'fields':['sales_team']},
@@ -668,7 +668,7 @@
'Receivable Voucher': {'fields':['sales_team']},
'Sales Order': {'fields':['sales_team','Packing List']}
},
- 'more_info': {
+ '__more_info': {
'Customer': {'fields':['More Info']},
'Delivery Note': {'fields':['More Info']},
'Enquiry': {'fields':['More Info']},
@@ -683,14 +683,14 @@
'Serial No': {'fields':['More Info']},
'Supplier': {'fields':['More Info']}
},
- 'quality': {
+ '__quality': {
'Item': {'fields':['Item Inspection Criteria','inspection_required']},
'Purchase Receipt': {'purchase_receipt_details':['qa_no']}
},
- 'manufacturing': {
+ '__manufacturing': {
'Item': {'fields':['Manufacturing']}
},
- 'pos': {
+ '__pos': {
'Receivable Voucher': {'fields':['is_pos']}
}
}