patch fixes
diff --git a/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt b/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt
deleted file mode 100644
index fca0efe..0000000
--- a/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'modified_by': 'Administrator', 'name': 'Purchase Invoice', 'parent': None, 'dt_label': 'Purchase Invoice', 'creation': '2010-06-10 10:44:55', 'modified': '2010-06-10 10:44:55', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Purchase Invoice', 'parentfield': None}]
\ No newline at end of file
diff --git a/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt b/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt
deleted file mode 100644
index 80aa5d1..0000000
--- a/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'modified_by': 'Administrator', 'name': 'Sales Invoice', 'parent': None, 'dt_label': 'Sales Invoice', 'creation': '2010-06-10 10:44:40', 'modified': '2010-06-10 10:44:40', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Sales Invoice', 'parentfield': None}]
\ No newline at end of file
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 09af9b7..8f9afd0 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,7 +3,7 @@
# 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-04-02 13:05:04',
'modified_by': u'Administrator',
diff --git a/erpnext/buying/DocType Label/Indent/Indent.txt b/erpnext/buying/DocType Label/Indent/Indent.txt
deleted file mode 100644
index ec6d001..0000000
--- a/erpnext/buying/DocType Label/Indent/Indent.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# DocType Label, Purchase Request
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-10 15:33:53',
- 'docstatus': 0,
- 'modified': '2012-01-10 15:33:53',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all DocType Label
- {
- 'doctype': 'DocType Label',
- 'dt': 'Purchase Request',
- 'dt_label': 'Purchase Requisition',
- 'name': '__common__'
- },
-
- # DocType Label, Purchase Request
- {
- 'doctype': 'DocType Label',
- 'name': 'Purchase Request'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/Role/Purchase Manager/Purchase Manager.txt b/erpnext/buying/Role/Purchase Manager/Purchase Manager.txt
deleted file mode 100644
index b02d186..0000000
--- a/erpnext/buying/Role/Purchase Manager/Purchase Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Purchase Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:07:53',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Buying',
- 'name': '__common__',
- 'role_name': 'Purchase Manager'
- },
-
- # Role, Purchase Manager
- {
- 'doctype': 'Role',
- 'name': 'Purchase Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/Role/Purchase Master Manager/Purchase Master Manager.txt b/erpnext/buying/Role/Purchase Master Manager/Purchase Master Manager.txt
deleted file mode 100644
index 41d9f23..0000000
--- a/erpnext/buying/Role/Purchase Master Manager/Purchase Master Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Purchase Master Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 13:50:20',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Buying',
- 'name': '__common__',
- 'role_name': 'Purchase Master Manager'
- },
-
- # Role, Purchase Master Manager
- {
- 'doctype': 'Role',
- 'name': 'Purchase Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/Role/Purchase User/Purchase User.txt b/erpnext/buying/Role/Purchase User/Purchase User.txt
deleted file mode 100644
index 1495c84..0000000
--- a/erpnext/buying/Role/Purchase User/Purchase User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Purchase User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:08:01',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Buying',
- 'name': '__common__',
- 'role_name': 'Purchase User'
- },
-
- # Role, Purchase User
- {
- 'doctype': 'Role',
- 'name': 'Purchase User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/Role/Supplier/Supplier.txt b/erpnext/buying/Role/Supplier/Supplier.txt
deleted file mode 100644
index 97f4d09..0000000
--- a/erpnext/buying/Role/Supplier/Supplier.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Supplier
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-06-26 14:42:19',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Buying',
- 'name': '__common__',
- 'role_name': 'Supplier'
- },
-
- # Role, Supplier
- {
- 'doctype': 'Role',
- 'name': 'Supplier'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/__init__.py b/erpnext/buying/__init__.py
index e69de29..8e18bc5 100644
--- a/erpnext/buying/__init__.py
+++ b/erpnext/buying/__init__.py
@@ -0,0 +1,6 @@
+install_docs = [
+ {"doctype":"Role", "name":"Purchase Manager"},
+ {"doctype":"Role", "name":"Purchase User"},
+ {"doctype":"Role", "name":"Purchase Master Manager"},
+ {"doctype":"Role", "name":"Supplier"}
+]
\ No newline at end of file
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 99d498c..a9a9c58 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
@@ -62,8 +62,11 @@
# reload custom search criteria
for d in webnotes.conn.sql("""select name, module from
`tabSearch Criteria` where ifnull(standard, 'No') = 'Yes' and ifnull(disabled, 0) = 0"""):
- print d
- reload_doc(d[1], 'search_criteria', d[0].replace('-', '_'))
+ try:
+ reload_doc(d[1], 'search_criteria', d[0].replace('-', '_'))
+ print d
+ except Exception, e:
+ print "did not reload: " + str(d)
webnotes.conn.sql("""DELETE FROM `tabPrint Format`
WHERE name IN ('Delivery Note Format', 'Purchase Order Format',
@@ -74,7 +77,10 @@
# reload custom print format
for d in webnotes.conn.sql("""select name, module from `tabPrint Format`
where ifnull(standard, 'No') = 'Yes'"""):
- reload_doc(d[1], 'Print Format', d[0])
+ try:
+ reload_doc(d[1], 'Print Format', d[0])
+ except Exception, e:
+ print "did not reload: " + str(d)
# Reload GL Mapper
for d in webnotes.conn.sql("select name from `tabGL Mapper`"):
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 d0188b4..db75ea4 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -223,7 +223,7 @@
'description': 'DN-RV duplicate table entry'
},
{
- 'patch_module': 'patches.jan_mar_2012',
+ 'patch_module': 'patches.mar_2012',
'patch_file': 'so_rv_mapper_fix',
'description': 'SO-RV duplicate mapper entry removal'
},
@@ -256,5 +256,5 @@
'patch_module': 'patches.mar_2012',
'patch_file': 'delete_docformat',
'description': 'Deletes DocFormat from database'
- },
+ }
]
diff --git a/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt b/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt
deleted file mode 100644
index e89caa4..0000000
--- a/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'modified_by': 'Administrator', 'name': 'Quality Inspection', 'parent': None, 'dt_label': 'Quality Inspection', 'creation': '2010-06-28 12:56:06', 'modified': '2010-06-28 12:56:06', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Quality Inspection', 'parentfield': None}]
\ No newline at end of file
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 f50c05b..bb0e538 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,7 +3,7 @@
# 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-04-02 13:05:03',
'modified_by': u'Administrator',
@@ -149,6 +149,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',
@@ -245,6 +255,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',
@@ -256,6 +277,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',