From 84a2e546dede749c250e34dcd23e3975492a6678 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 2 Jul 2012 11:13:48 +0530 Subject: [PATCH 1/2] po date should be greated than equal to pur request date --- .../Purchase Request-Purchase Order.txt | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt b/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt index befcb8c538..e4fdd9365a 100644 --- a/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt +++ b/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2012-04-03 12:49:50', + 'modified': '2012-07-02 11:12:28', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,6 @@ # These values are common for all Field Mapper Detail { 'doctype': u'Field Mapper Detail', - 'map': u'Yes', 'name': '__common__', 'parent': u'Purchase Request-Purchase Order', 'parentfield': u'field_mapper_details', @@ -50,6 +49,7 @@ 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', 'from_field': u'company', + 'map': u'Yes', 'match_id': 0, 'to_field': u'company' }, @@ -58,6 +58,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'parenttype', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_doctype' }, @@ -66,6 +67,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'parent', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_docname' }, @@ -74,6 +76,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'name', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_detail_docname' }, @@ -82,6 +85,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'uom', + 'map': u'Yes', 'match_id': 1, 'to_field': u'stock_uom' }, @@ -90,6 +94,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:flt(1)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'conversion_factor' }, @@ -98,6 +103,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:flt(obj.qty) - flt(obj.ordered_qty)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'stock_qty' }, @@ -106,6 +112,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:flt(obj.qty) - flt(obj.ordered_qty)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'qty' }, @@ -114,10 +121,21 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'schedule_date', + 'map': u'Yes', 'match_id': 1, 'to_field': u'schedule_date' }, + # Field Mapper Detail + { + 'checking_operator': u'>=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'transaction_date', + 'map': u'No', + 'match_id': 0, + 'to_field': u'transaction_date' + }, + # Table Mapper Detail { 'doctype': u'Table Mapper Detail', From 67512615893757966091ddd304f11419513a2335 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 2 Jul 2012 11:24:37 +0530 Subject: [PATCH 2/2] reload pr-po mapper patch' --- erpnext/patches/july_2012/__init__.py | 0 erpnext/patches/july_2012/reload_pr_po_mapper.py | 4 ++++ erpnext/patches/patch_list.py | 5 +++++ 3 files changed, 9 insertions(+) create mode 100644 erpnext/patches/july_2012/__init__.py create mode 100644 erpnext/patches/july_2012/reload_pr_po_mapper.py diff --git a/erpnext/patches/july_2012/__init__.py b/erpnext/patches/july_2012/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/patches/july_2012/reload_pr_po_mapper.py b/erpnext/patches/july_2012/reload_pr_po_mapper.py new file mode 100644 index 0000000000..75ee5c4d71 --- /dev/null +++ b/erpnext/patches/july_2012/reload_pr_po_mapper.py @@ -0,0 +1,4 @@ +def execute(): + import webnotes + from webnotes.modules import reload_doc + reload_doc('buying', 'DocType Mapper', 'Purchase Request-Purchase Order') \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 35b59fdd33..b2d5f6cece 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -462,4 +462,9 @@ patch_list = [ 'patch_file': 'cache_item_table', 'description': "create cache item table again" }, + { + 'patch_module': 'patches.july_2012', + 'patch_file': 'reload_pr_po_mapper', + 'description': "order date should be greater than equal to request date" + }, ] \ No newline at end of file