Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/patches/july_2013/p08_custom_print_format_net_total_export.py b/patches/july_2013/p08_custom_print_format_net_total_export.py
new file mode 100644
index 0000000..a6a8335
--- /dev/null
+++ b/patches/july_2013/p08_custom_print_format_net_total_export.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+import webnotes
+import re
+
+def execute():
+ for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No'"""):
+ changed = False
+ for match in re.findall("(doc.net_total.*doc.conversion_rate)", html):
+ if match.replace(" ", "") == "doc.net_total/doc.conversion_rate":
+ html = html.replace(match, "doc.net_total_export")
+ changed = True
+
+ if changed:
+ webnotes.conn.set_value("Print Format", name, "html", html)
+
\ No newline at end of file
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index a0ba0df..45a9b5b 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -286,7 +286,7 @@
},
warehouse: function(doc, cdt, cdn) {
- var item = webnotes.get_doc(cdt, cdn);
+ var item = wn.model.get_doc(cdt, cdn);
if(item.item_code && (item.warehouse || item.reserved_warehouse)) {
this.frm.call({
method: "selling.utils.get_available_qty",
diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js
index b642735..f672e7a 100644
--- a/setup/doctype/item_group/item_group.js
+++ b/setup/doctype/item_group/item_group.js
@@ -37,7 +37,7 @@
return{
filters:[
['Item Group', 'is_group', '=', 'Yes'],
- ['Item Group', 'naem', '!=', doc.item_group_name]
+ ['Item Group', 'name', '!=', doc.item_group_name]
]
}
}
\ No newline at end of file