patch fixes
This commit is contained in:
parent
614e7ab757
commit
e9d45bcb28
@ -279,7 +279,7 @@
|
|||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-02-13 14:58:32.967368",
|
"modified": "2015-02-18 14:58:32.967368",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM",
|
"name": "BOM",
|
||||||
|
@ -117,4 +117,4 @@ erpnext.patches.v5_0.new_crm_module
|
|||||||
erpnext.patches.v5_0.rename_customer_issue
|
erpnext.patches.v5_0.rename_customer_issue
|
||||||
erpnext.patches.v5_0.update_material_transfer_for_manufacture
|
erpnext.patches.v5_0.update_material_transfer_for_manufacture
|
||||||
erpnext.patches.v5_0.manufacturing_activity_type
|
erpnext.patches.v5_0.manufacturing_activity_type
|
||||||
erpnext.patches.v5_0.update_item_desc_and_image
|
erpnext.patches.v5_0.update_item_description_and_image
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
||||||
# License: GNU General Public License v3. See license.txt
|
|
||||||
|
|
||||||
import frappe
|
|
||||||
from frappe.website.utils import find_first_image
|
|
||||||
import re
|
|
||||||
|
|
||||||
def execute():
|
|
||||||
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)
|
|
||||||
names = frappe.db.sql("""select name, description from `tab{0}` doc where doc.description is not null""".format(dt),as_dict=1)
|
|
||||||
for d in names:
|
|
||||||
data = d.description
|
|
||||||
image_url = find_first_image(data)
|
|
||||||
desc = re.sub("\<img[^>]+\>", "", data)
|
|
||||||
|
|
||||||
frappe.db.sql("""update `tab{0}` set description = %s, image = %s
|
|
||||||
where name = %s """.format(dt),(desc, image_url, d.name))
|
|
Loading…
Reference in New Issue
Block a user