Merge pull request #183 from nijil/master
allignment and error fix
diff --git a/erpnext/patches/reload_gl_mapper.py b/erpnext/patches/reload_gl_mapper.py
new file mode 100644
index 0000000..edb00bc
--- /dev/null
+++ b/erpnext/patches/reload_gl_mapper.py
@@ -0,0 +1,6 @@
+def execute():
+ import webnotes
+ from webnotes.modules.module_manager import reload_doc
+
+ # reload jv gl mapper
+ reload_doc('accounts', 'GL Mapper', 'Journal Voucher')
diff --git a/erpnext/patches/update_gle_against_voucher_for_jv.py b/erpnext/patches/update_gle_against_voucher_for_jv.py
index 96401ba..5a03ec7 100644
--- a/erpnext/patches/update_gle_against_voucher_for_jv.py
+++ b/erpnext/patches/update_gle_against_voucher_for_jv.py
@@ -1,11 +1,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
from webnotes.model.code import get_obj
- # reload jv gl mapper
- reload_doc('accounts', 'GL Mapper', 'Journal Voucher')
-
# select jv where against_jv exists
jv = webnotes.conn.sql("select distinct parent from `tabJournal Voucher Detail` where docstatus = 1 and ifnull(against_jv, '') != ''")