Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt
index f1f7710..78431f5 100644
--- a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt
+++ b/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt
@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:36',
'docstatus': 0,
- 'modified': '2011-08-08 16:56:40',
+ 'modified': '2011-08-31 16:53:11',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -31,7 +31,7 @@
# These values are common for all DocType Mapper
{
- 'doctype': 'DocType Mapper',
+ 'doctype': u'DocType Mapper',
'from_doctype': 'Sales Order',
'module': 'Accounts',
'name': '__common__',
@@ -41,7 +41,7 @@
# DocType Mapper, Sales Order-Receivable Voucher
{
- 'doctype': 'DocType Mapper',
+ 'doctype': u'DocType Mapper',
'name': 'Sales Order-Receivable Voucher'
},
@@ -128,7 +128,7 @@
'match_id': 1,
'to_field': 'entries',
'to_table': 'RV Detail',
- 'validation_logic': 'amount > ifnull(billed_amt, 0) and docstatus = 1'
+ 'validation_logic': 'docstatus = 1'
},
# Table Mapper Detail
diff --git a/patches/patch.py b/patches/patch.py
index e815865..6ca0171 100644
--- a/patches/patch.py
+++ b/patches/patch.py
@@ -1,7 +1,7 @@
# REMEMBER to update this
# ========================
-last_patch = 355
+last_patch = 357
#-------------------------------------------
@@ -293,7 +293,7 @@
elif patch_no == 353:
reload_doc('hr', 'doctype', 'salary_manager')
elif patch_no == 354:
- reload_doc('setup', 'doctype','feature_setup')
+ reload_doc('setup', 'doctype','features_setup')
reload_doc('stock','doctype','item')
sql("update tabDocField set label='Produced Qty',description='Updated after finished goods are transferred to FG Warehouse through Stock Entry' where parent='Production Order' and fieldname='produced_qty'")
rs = sql("select fieldname from tabDocField where parent='Features Setup' and fieldname is not null")
@@ -305,4 +305,8 @@
elif patch_no == 355:
reload_doc('hr', 'doctype', 'salary_slip')
delete_doc('DocType', 'Salary Control Panel')
-
+ elif patch_no == 356:
+ reload_doc('core', 'doctype', 'doctype')
+ sql("update `tabDocType` set default_print_format = 'Standard' where name = 'Delivery Note'")
+ elif patch_no == 357:
+ sql("delete from `tabDocField` where (fieldname in ('client_string', 'server_code_error', 'server_code_compiled', 'server_code', 'server_code_core', 'client_script', 'client_script_core', 'dt_template', 'change_log') or label = 'Template') and parent = 'DocType'")
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index e5acd16..6d48914 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -443,8 +443,8 @@
# ==========================================
def update_pack_nett_weight(self):
for d in getlist(self.doclist, 'delivery_note_details'):
- if d.item_name:
- item_wt = sql("select nett_weight from `tabItem` where item_name = '%s'" % (d.item_name))
+ if d.item_code:
+ item_wt = sql("select nett_weight from `tabItem` where name = %s", (d.item_code))
d.pack_nett_wt = item_wt and flt(item_wt[0][0])*flt(d.qty) or 0
# ==========================================