mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
update item image in invoice if item exists
This commit is contained in:
@@ -31,7 +31,9 @@ def execute():
|
|||||||
desc, image = extract_image_and_description(cstr(d.description))
|
desc, image = extract_image_and_description(cstr(d.description))
|
||||||
|
|
||||||
if not image:
|
if not image:
|
||||||
image = item_details.get(d.item_code).image
|
item_detail = item_details.get(d.item_code)
|
||||||
|
if item_detail:
|
||||||
|
image = item_detail.image
|
||||||
|
|
||||||
frappe.db.sql("""update `tab{0}` set description = %s, image = %s
|
frappe.db.sql("""update `tab{0}` set description = %s, image = %s
|
||||||
where name = %s """.format(dt), (desc, image, d.name))
|
where name = %s """.format(dt), (desc, image, d.name))
|
||||||
|
|||||||
Reference in New Issue
Block a user