patch fixes
diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt
index 15369e4..66572be 100644
--- a/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt
+++ b/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:33',
+ 'creation': '2012-04-02 13:38:02',
'docstatus': 0,
- 'modified': '2012-03-30 14:50:43',
+ 'modified': '2012-04-02 13:38:02',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
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 efa1291..66de949 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
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:35',
+ 'creation': '2012-04-02 13:38:02',
'docstatus': 0,
- 'modified': '2012-03-30 13:33:31',
+ 'modified': '2012-04-02 13:38:02',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/patches/jan_mar_2012/label_cleanup.py b/erpnext/patches/jan_mar_2012/label_cleanup.py
index 9e4d4a9..642140b 100644
--- a/erpnext/patches/jan_mar_2012/label_cleanup.py
+++ b/erpnext/patches/jan_mar_2012/label_cleanup.py
@@ -3,16 +3,6 @@
from webnotes.model import delete_doc
from webnotes.modules import reload_doc
- dt = {
- 'selling': ['quotation', 'sales_order', 'quotation_detail', 'sales_order_detail'],
- 'stock': ['delivery_note', 'delivery_note_detail', 'purchase_receipt', 'purchase_receipt_detail'],
- 'accounts': ['receivable_voucher', 'payable_voucher', 'rv_detail', 'pv_detail', 'rv_tax_detail', 'purchase_tax_detail'],
- 'buying': ['purchase_order', 'po_detail']
- }
- for m in dt:
- for d in dt[m]:
- reload_doc(m, 'doctype', d)
-
webnotes.conn.sql("""delete from `tabDocField`
where label in ('Note1', 'OT Notes', 'Note', 'Note HTML', 'Rates HTML')
diff --git a/erpnext/patches/jan_mar_2012/pending_patches.py b/erpnext/patches/jan_mar_2012/pending_patches.py
index 0cc73f3..c21030a 100644
--- a/erpnext/patches/jan_mar_2012/pending_patches.py
+++ b/erpnext/patches/jan_mar_2012/pending_patches.py
@@ -21,7 +21,6 @@
sql = webnotes.conn.sql
reload_doc('hr', 'doctype', 'appraisal')
- reload_doc('hr', 'doctype', 'appraisal_detail')
sql("update `tabDocField` set `hidden` = 0 where fieldname = 'group_or_ledger' and parent = 'Cost Center'")
sql("update tabDocPerm set amend = 0 where parent = 'Salary Structure'")
@@ -31,12 +30,7 @@
sql("delete from `tabDocField` where label = 'View Ledger Entry' and parent = 'Journal Voucher' and fieldtype = 'Button' limit 1")
if sql("select count(name) from `tabDocField` where label = 'Get Balance' and parent = 'Journal Voucher' and fieldtype = 'Button'")[0][0] > 1:
sql("delete from `tabDocField` where label = 'Get Balance' and parent = 'Journal Voucher' and fieldtype = 'Button' limit 1")
-
- reload_doc('accounts', 'doctype', 'internal_reconciliation')
- reload_doc('accounts', 'doctype', 'ir_payment_detail')
- reload_doc('accounts', 'Module Def', 'Accounts')
-
-
+
if sql("select count(name) from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button'")[0][0] > 1:
sql("delete from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button' limit 1")
@@ -44,8 +38,6 @@
reload_doc('stock', 'DocType Mapper', 'Purchase Order-Purchase Receipt')
reload_doc('accounts', 'doctype', 'cost_center')
- reload_doc('stock', 'Module Def', 'Stock')
- sql("delete from `tabModule Def Item` where display_name = 'Serial No' and parent = 'Support'")
sql("update `tabDocType` set subject = 'Item Code: %(item_code)s, Warehouse: %(warehouse)s' where name = 'Serial No'")
# Patch for adding packing related columns (packed by, checked by, shipping mark etc)
diff --git a/erpnext/patches/jan_mar_2012/reload_mapper.py b/erpnext/patches/jan_mar_2012/reload_mapper.py
index f3a469f..987d4a7 100644
--- a/erpnext/patches/jan_mar_2012/reload_mapper.py
+++ b/erpnext/patches/jan_mar_2012/reload_mapper.py
@@ -1,6 +1,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note')
reload_doc('accounts', 'DocType Mapper', 'Sales Order-Sales Invoice')
diff --git a/erpnext/patches/jan_mar_2012/reload_quote.py b/erpnext/patches/jan_mar_2012/reload_quote.py
index 5715bb4..8df293f 100644
--- a/erpnext/patches/jan_mar_2012/reload_quote.py
+++ b/erpnext/patches/jan_mar_2012/reload_quote.py
@@ -1,4 +1,4 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('selling', 'doctype', 'quotation')
diff --git a/erpnext/patches/jan_mar_2012/reload_table.py b/erpnext/patches/jan_mar_2012/reload_table.py
index 28a597b..5358320 100644
--- a/erpnext/patches/jan_mar_2012/reload_table.py
+++ b/erpnext/patches/jan_mar_2012/reload_table.py
@@ -1,11 +1,3 @@
def execute():
- import webnotes
- from webnotes.modules import reload_doc
- reload_doc('selling', 'doctype', 'quotation_detail')
- reload_doc('selling', 'doctype', 'sales_order_detail')
- reload_doc('stock', 'doctype', 'delivery_note_detail')
- reload_doc('stock', 'doctype', 'purchase_receipt_detail')
- reload_doc('buying', 'doctype', 'po_detail')
- reload_doc('accounts', 'doctype', 'rv_detail')
- reload_doc('accounts', 'doctype', 'pv_detail')
+ pass
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index e2cd2f0..06bba6c 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -3,7 +3,7 @@
from webnotes.model.code import get_obj
from wnf import replace_code
from termcolor import colored
-from webnotes.modules.module_manager import reload_doc
+from webnotes.modules import reload_doc
from webnotes.utils import make_esc
import os
diff --git a/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
index 3a94419..7562fca 100644
--- a/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
+++ b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
@@ -1,6 +1,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'stock_entry')
webnotes.conn.sql("update `tabDocField` set options = concat(options, '\nOthers') where fieldname = 'purpose' and parent = 'Stock Entry'")
diff --git a/erpnext/patches/jan_mar_2012/update_se_fld_options.py b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
index 95bb528..0428fc9 100644
--- a/erpnext/patches/jan_mar_2012/update_se_fld_options.py
+++ b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
@@ -2,5 +2,5 @@
import webnotes
webnotes.conn.sql("update `tabDocField` set options = 'BOM' where fieldname = 'bom_no' and parent = 'Stock Entry'")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'stock_entry')
diff --git a/erpnext/patches/mar_2012/pos_invoice_fix.py b/erpnext/patches/mar_2012/pos_invoice_fix.py
index 77ebcb4..9848eb8 100644
--- a/erpnext/patches/mar_2012/pos_invoice_fix.py
+++ b/erpnext/patches/mar_2012/pos_invoice_fix.py
@@ -1,5 +1,3 @@
def execute():
- import webnotes
- webnotes.conn.sql("DELETE FROM `tabDocFormat` WHERE format='POS Invoice'")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('accounts', 'Print Format', 'POS Invoice')
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index a4a0ac7..4caf82e 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -232,6 +232,7 @@
'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/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index 0a27e19..b7e6cd4 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:34',
+ 'creation': '2010-08-08 17:09:35',
'docstatus': 0,
- 'modified': '2012-03-27 14:17:40',
+ 'modified': '2012-04-02 14:03:39',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -189,6 +189,19 @@
{
'doctype': u'Table Mapper Detail',
'from_field': u'po_details',
+ 'from_table': u'PO Detail',
+ 'match_id': 1,
+ 'reference_doctype_key': u'prevdoc_doctype',
+ 'reference_key': u'prevdoc_detail_docname',
+ 'to_field': u'purchase_receipt_details',
+ 'to_table': u'Purchase Receipt Detail',
+ 'validation_logic': u'docstatus=1 and qty > ifnull(received_qty,0)'
+ },
+
+ # Table Mapper Detail
+ {
+ 'doctype': u'Table Mapper Detail',
+ 'from_field': u'po_details',
'from_table': u'Purchase Order Item',
'match_id': 1,
'reference_doctype_key': u'prevdoc_doctype',
@@ -212,6 +225,17 @@
{
'doctype': u'Table Mapper Detail',
'from_field': u'purchase_tax_details',
+ 'from_table': u'Purchase Tax Detail',
+ 'match_id': 2,
+ 'to_field': u'purchase_tax_details',
+ 'to_table': u'Purchase Tax Detail',
+ 'validation_logic': u'docstatus = 1'
+ },
+
+ # Table Mapper Detail
+ {
+ 'doctype': u'Table Mapper Detail',
+ 'from_field': u'purchase_tax_details',
'from_table': u'Purchase Taxes and Charges',
'match_id': 2,
'to_field': u'purchase_tax_details',
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 651131e..aeb5ec2 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
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-09-20 12:33:35',
+ 'creation': '2010-08-08 17:09:35',
'docstatus': 0,
- 'modified': '2012-03-27 14:17:39',
+ 'modified': '2012-04-02 13:37:14',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -139,6 +139,16 @@
# 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
+ {
'doctype': u'Field Mapper Detail',
'from_field': u'eval: flt(obj.qty) - flt(obj.delivered_qty)',
'map': u'Yes',
@@ -235,6 +245,17 @@
{
'doctype': u'Table Mapper Detail',
'from_field': u'other_charges',
+ 'from_table': u'RV Tax Detail',
+ 'match_id': 2,
+ 'to_field': u'other_charges',
+ 'to_table': u'RV Tax Detail',
+ 'validation_logic': u'name is not null'
+ },
+
+ # Table Mapper Detail
+ {
+ 'doctype': u'Table Mapper Detail',
+ 'from_field': u'other_charges',
'from_table': u'Sales Taxes and Charges',
'match_id': 2,
'to_field': u'other_charges',
@@ -246,6 +267,19 @@
{
'doctype': u'Table Mapper Detail',
'from_field': u'sales_order_details',
+ 'from_table': u'Sales Order Detail',
+ 'match_id': 1,
+ 'reference_doctype_key': u'prevdoc_doctype',
+ 'reference_key': u'prevdoc_detail_docname',
+ 'to_field': u'delivery_note_details',
+ 'to_table': u'Delivery Note Detail',
+ 'validation_logic': u'qty > ifnull(delivered_qty,0) and docstatus = 1'
+ },
+
+ # Table Mapper Detail
+ {
+ 'doctype': u'Table Mapper Detail',
+ 'from_field': u'sales_order_details',
'from_table': u'Sales Order Item',
'match_id': 1,
'reference_doctype_key': u'prevdoc_doctype',
@@ -264,4 +298,4 @@
'to_table': u'Delivery Note',
'validation_logic': u'docstatus = 1'
}
-]
+]
\ No newline at end of file