Merge pull request #167 from anandpdoshi/master
Patch to remove extra button from Email Digest Form
diff --git a/data/master.sql.gz b/data/master.sql.gz
index f3eaf34..9f2ed7f 100644
--- a/data/master.sql.gz
+++ b/data/master.sql.gz
Binary files differ
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
index ca79387..41722d5 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
@@ -66,7 +66,7 @@
get_server_fields('get_default_values', args, 'entries', doc, el[i].doctype, el[i].name, 1);
}
}
- cur_frm.cscript.calc_total(doc);
+ cur_frm.cscript.calc_amount(doc, 1);
}
if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1,callback);
diff --git a/erpnext/patches/c_form_patch.py b/erpnext/patches/c_form_patch.py
index a55768d..0f8fa22 100644
--- a/erpnext/patches/c_form_patch.py
+++ b/erpnext/patches/c_form_patch.py
@@ -4,7 +4,7 @@
reload_doc('accounts', 'doctype', 'receivable_voucher')
reload_doc('accounts', 'doctype', 'c_form')
- reload_doc('accounts', 'doctype', 'c_form_invoice_details')
+ reload_doc('accounts', 'doctype', 'c_form_invoice_detail')
reload_doc('accounts', 'Module Def', 'Accounts')
sql = webnotes.conn.sql
diff --git a/erpnext/patches/employeewise_balance_leave_report.py b/erpnext/patches/employeewise_balance_leave_report.py
index 6af2364..59c5940 100644
--- a/erpnext/patches/employeewise_balance_leave_report.py
+++ b/erpnext/patches/employeewise_balance_leave_report.py
@@ -6,7 +6,9 @@
"""
def execute():
from webnotes.model.doc import Document
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('hr', 'search_criteria', 'employeewise_balance_leave_report')
d = Document('Search Criteria', 'employeewise_balance_leave_report')
d.criteria_name = 'Employee Leave Balance Report'
d.description = 'Employeewise Balance Leave Report'
- d.save()
\ No newline at end of file
+ d.save()
diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py
index 7e8a083..4e32c02 100644
--- a/erpnext/patches/patch.py
+++ b/erpnext/patches/patch.py
@@ -6,6 +6,7 @@
#-------------------------------------------
def execute(patch_no):
+ return
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/reload_employeewise_balance_leave_report.py b/erpnext/patches/reload_employeewise_balance_leave_report.py
new file mode 100644
index 0000000..b03b44b
--- /dev/null
+++ b/erpnext/patches/reload_employeewise_balance_leave_report.py
@@ -0,0 +1,4 @@
+def execute():
+ import webnotes
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('hr', 'search_criteria', 'employeewise_balance_leave_report')
diff --git a/erpnext/patches/remove_page_break_from_defaults.py b/erpnext/patches/remove_page_break_from_defaults.py
index b565e93..8d842e3 100644
--- a/erpnext/patches/remove_page_break_from_defaults.py
+++ b/erpnext/patches/remove_page_break_from_defaults.py
@@ -1,5 +1,3 @@
def execute():
import webnotes
- webnotes.conn.sql("""\
- DELETE FROM `tabDefaultValue`
- WHERE parent='Control Panel' AND defkey='page_break'""")
+ webnotes.conn.sql("""delete from `tabDefaultValue` where defkey in ('page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos', 'purchase_discounts', 'recurring_invoice') and parent = 'Control Panel'""")
diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py
index ae74797..4537876 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.py
+++ b/erpnext/setup/doctype/customer_group/customer_group.py
@@ -39,7 +39,5 @@
def validate(self):
- r = sql("select name from `tabCustomer Group` where name = '%s' and docstatus = 2"%(self.doc.customer_group_name))
- if r:
- msgprint("%s record is trashed. To untrash please go to Setup & click on Trash."%(self.doc.customer_group_name))
- raise Exception
\ No newline at end of file
+ if sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", (self.doc.customer_group_name)):
+ msgprint("%s record is trashed. To untrash please go to Setup & click on Trash."%(self.doc.customer_group_name), raise_exception = 1)