",
+ "idx": 1,
+ "modified": "2015-05-29 01:57:51.203850",
+ "modified_by": "Administrator",
+ "name": "Cheque Printing Format",
+ "owner": "Administrator",
+ "print_format_type": "Server",
"standard": "Yes"
-}
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js
index 08bf0febd4..ee0c9bf83d 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js
@@ -12,7 +12,6 @@ frappe.listview_settings['Purchase Order'] = {
return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Stopped"];
}
},
- order_by: "per_received asc, modified desc",
onload: function(listview) {
var method = "erpnext.buying.doctype.purchase_order.purchase_order.stop_or_unstop_purchase_orders";
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index c8bbefff3c..ec34b53189 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors"
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
app_icon = "icon-th"
app_color = "#e74c3c"
-app_version = "5.0.11"
+app_version = "5.0.12"
error_report_email = "support@erpnext.com"
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 813b1fc6fe..f9590a9fe0 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -160,3 +160,4 @@ erpnext.patches.v5_0.update_operation_description
erpnext.patches.v5_0.set_footer_address
execute:frappe.db.set_value("Backup Manager", None, "send_backups_to_dropbox", 1 if frappe.db.get_value("Backup Manager", None, "upload_backups_to_dropbox") in ("Daily", "Weekly") else 0)
execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and modified_by='Administrator' and role='Guest'")
+erpnext.patches.v5_0.update_item_and_description_again
diff --git a/erpnext/patches/v5_0/update_item_and_description_again.py b/erpnext/patches/v5_0/update_item_and_description_again.py
new file mode 100644
index 0000000000..622274807a
--- /dev/null
+++ b/erpnext/patches/v5_0/update_item_and_description_again.py
@@ -0,0 +1,49 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+import frappe
+from frappe.utils import cstr
+import re
+
+def execute():
+ item_details = frappe._dict()
+ for d in frappe.db.sql("select name, description from `tabItem`", as_dict=1):
+ description = cstr(d.description).strip()
+ new_desc = extract_description(description)
+
+ item_details.setdefault(d.name, frappe._dict({
+ "old_description": description,
+ "new_description": new_desc
+ }))
+
+
+ dt_list= ["Purchase Order Item","Supplier Quotation Item", "BOM", "BOM Explosion Item" , \
+ "BOM Item", "Opportunity Item" , "Quotation Item" , "Sales Order Item" , "Delivery Note Item" , \
+ "Material Request Item" , "Purchase Receipt Item" , "Stock Entry Detail"]
+ for dt in dt_list:
+ frappe.reload_doctype(dt)
+ records = frappe.db.sql("""select name, `{0}` as item_code, description from `tab{1}`
+ where description is not null and description like '%%
]*\>".format(tag), "", desc)
+
+ return desc
diff --git a/erpnext/patches/v5_0/update_item_description_and_image.py b/erpnext/patches/v5_0/update_item_description_and_image.py
index 6b4705205e..a18df2f653 100644
--- a/erpnext/patches/v5_0/update_item_description_and_image.py
+++ b/erpnext/patches/v5_0/update_item_description_and_image.py
@@ -11,23 +11,23 @@ def execute():
for d in frappe.db.sql("select name, description_html, description from `tabItem`", as_dict=1):
description = cstr(d.description_html).strip() or cstr(d.description).strip()
image_url, new_desc = extract_image_and_description(description)
-
+
item_details.setdefault(d.name, frappe._dict({
"old_description": description,
"new_description": new_desc,
"image_url": image_url
}))
-
-
+
+
dt_list= ["Purchase Order Item","Supplier Quotation Item", "BOM", "BOM Explosion Item" , \
"BOM Item", "Opportunity Item" , "Quotation Item" , "Sales Order Item" , "Delivery Note Item" , \
"Material Request Item" , "Purchase Receipt Item" , "Stock Entry Detail"]
for dt in dt_list:
frappe.reload_doctype(dt)
- records = frappe.db.sql("""select name, `{0}` as item_code, description from `tab{1}`
+ records = frappe.db.sql("""select name, `{0}` as item_code, description from `tab{1}`
where description is not null and image is null and description like '%%]+\>", "", data)
-
- return image_url, desc
\ No newline at end of file
+
+ return image_url, desc
diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js
index 085d0e819d..e0c75b6ebd 100644
--- a/erpnext/selling/doctype/sales_order/sales_order_list.js
+++ b/erpnext/selling/doctype/sales_order/sales_order_list.js
@@ -14,7 +14,6 @@ frappe.listview_settings['Sales Order'] = {
return [__("Completed"), "green", "per_delivered,=,100|per_billed,=,100|status,!=,Stopped"];
}
},
- order_by: "per_delivered asc, modified desc",
onload: function(listview) {
var method = "erpnext.selling.doctype.sales_order.sales_order.stop_or_unstop_sales_orders";
diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json
index 9d31f091c9..3ef2e15085 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.json
+++ b/erpnext/stock/doctype/serial_no/serial_no.json
@@ -151,19 +151,20 @@
},
{
"fieldname": "purchase_document_type",
- "fieldtype": "Select",
+ "fieldtype": "Link",
"label": "Creation Document Type",
"no_copy": 1,
- "options": "\nPurchase Receipt\nStock Entry\nSerial No",
+ "options": "DocType",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "purchase_document_no",
- "fieldtype": "Data",
+ "fieldtype": "Dynamic Link",
"hidden": 0,
"label": "Creation Document No",
"no_copy": 1,
+ "options": "purchase_document_type",
"permlevel": 0,
"read_only": 1
},
@@ -417,7 +418,7 @@
"icon": "icon-barcode",
"idx": 1,
"in_create": 0,
- "modified": "2015-02-20 05:08:12.961403",
+ "modified": "2015-05-28 21:35:58.378231",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No",
diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py
index 59a0667c5c..0b0246eae4 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.py
+++ b/erpnext/stock/doctype/serial_no/serial_no.py
@@ -34,6 +34,9 @@ class SerialNo(StockController):
self.validate_item()
self.on_stock_ledger_entry()
+ valid_purchase_document_type = ("Purchase Receipt", "Stock Entry", "Serial No")
+ self.validate_value("purchase_document_type", "in", valid_purchase_document_type)
+
def set_maintenance_status(self):
if not self.warranty_expiry_date and not self.amc_expiry_date:
self.maintenance_status = None
diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html
index e0824a20f9..34f95b9f27 100644
--- a/erpnext/templates/print_formats/includes/item_table_description.html
+++ b/erpnext/templates/print_formats/includes/item_table_description.html
@@ -1,5 +1,5 @@
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
-
+
{%- endif %}
@@ -8,7 +8,7 @@
{{ doc.item_code }}
{%- endif %}
{% if (doc.in_format_data("item_name") and
- (not doc.in_format_data("item_code") or doc.is_print_hide("item_code")
+ (not doc.in_format_data("item_code") or doc.is_print_hide("item_code")
or doc.item_code != doc.item_name)) -%}