From 0442bc5d63aae29673095cca69b3305b2fda1eb9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 2 Apr 2012 13:09:20 +0530 Subject: [PATCH 1/2] fix in patch list --- .../Sales Order-Sales Invoice.txt | 2 +- erpnext/patches/jan_mar_2012/rename_dt.py | 4 ++-- erpnext/patches/patch_list.py | 1 + .../Sales Order-Delivery Note.txt | 14 ++++++++++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt b/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt index efa129122e8..09af9b78fdb 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt @@ -5,7 +5,7 @@ { 'creation': '2010-09-20 12:33:35', 'docstatus': 0, - 'modified': '2012-03-30 13:33:31', + 'modified': '2012-04-02 13:05:04', 'modified_by': u'Administrator', 'owner': u'Administrator' }, diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py index e2cd2f0f6e2..99d498c3a7a 100644 --- a/erpnext/patches/jan_mar_2012/rename_dt.py +++ b/erpnext/patches/jan_mar_2012/rename_dt.py @@ -7,10 +7,10 @@ from webnotes.modules.module_manager import reload_doc from webnotes.utils import make_esc import os -def execute(): +def execute1(): update_file_content({'Follow up': 'Communication'}) -def execute1(): +def execute(): # delete dt, mapper delete_dt_and_mapper() diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index a4a0ac726d1..4caf82e15ca 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -232,6 +232,7 @@ patch_list = [ 'patch_file': 'delete_docformat', 'description': 'Deletes DocFormat from database' }, + { 'patch_module': 'patches.jan_mar_2012', 'patch_file': 'reload_mapper', 'description': 'SO-DN, SO-Rv, DN-RV' diff --git a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt index 651131e8fb2..f50c05bbfb9 100644 --- a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt @@ -5,7 +5,7 @@ { 'creation': '2010-09-20 12:33:35', 'docstatus': 0, - 'modified': '2012-03-27 14:17:39', + 'modified': '2012-04-02 13:05:03', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -127,6 +127,16 @@ 'to_field': u'export_amount' }, + # Field Mapper Detail + { + 'checking_operator': u'=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'basic_rate', + 'map': u'Yes', + 'match_id': 1, + 'to_field': u'basic_rate' + }, + # Field Mapper Detail { 'checking_operator': u'=', @@ -264,4 +274,4 @@ 'to_table': u'Delivery Note', 'validation_logic': u'docstatus = 1' } -] +] \ No newline at end of file From 896c6fdc3c332787ca1270f3d38392a22d245476 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 2 Apr 2012 14:06:33 +0530 Subject: [PATCH 2/2] fix in patch order --- .../patches/mar_2012/doctype_get_refactor.py | 3 ++ erpnext/patches/patch_list.py | 40 ++++++++++++------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/erpnext/patches/mar_2012/doctype_get_refactor.py b/erpnext/patches/mar_2012/doctype_get_refactor.py index c450e0adffb..819cd83a1ba 100644 --- a/erpnext/patches/mar_2012/doctype_get_refactor.py +++ b/erpnext/patches/mar_2012/doctype_get_refactor.py @@ -16,6 +16,9 @@ def execute(): change_to_decimal() def change_property_setter_fieldnames(): + import webnotes.model.sync + webnotes.model.sync.sync('core', 'property_setter') + docfield_list = webnotes.conn.sql("""\ SELECT name, fieldname FROM `tabDocField`""", as_list=1) custom_field_list = webnotes.conn.sql("""\ diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 4caf82e15ca..d0188b4b7b7 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -212,6 +212,31 @@ patch_list = [ 'patch_file': 'pos_invoice_fix', 'description': 'Reload POS Invoice' }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'reload_mapper', + 'description': 'SO-DN, SO-Rv, DN-RV' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'mapper_fix', + 'description': 'DN-RV duplicate table entry' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'so_rv_mapper_fix', + 'description': 'SO-RV duplicate mapper entry removal' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'sync_ref_db', + 'description': 'Deletes non required doctypes' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'rename_dt', + 'description': 'Rename DocType Patch' + }, { 'patch_module': 'patches.mar_2012', 'patch_file': 'cleanup_control_panel', @@ -232,19 +257,4 @@ patch_list = [ 'patch_file': 'delete_docformat', 'description': 'Deletes DocFormat from database' }, - { - 'patch_module': 'patches.jan_mar_2012', - 'patch_file': 'reload_mapper', - 'description': 'SO-DN, SO-Rv, DN-RV' - }, - { - 'patch_module': 'patches.jan_mar_2012', - 'patch_file': 'mapper_fix', - 'description': 'DN-RV duplicate table entry' - }, - { - 'patch_module': 'patches.mar_2012', - 'patch_file': 'so_rv_mapper_fix', - 'description': 'SO-RV duplicate mapper entry removal' - }, ]