[fix] Update item image in sales invoice
This commit is contained in:
parent
e98120b716
commit
34058ded0e
@ -20,12 +20,11 @@ def execute():
|
|||||||
for dt in dt_list:
|
for dt in dt_list:
|
||||||
frappe.reload_doctype(dt)
|
frappe.reload_doctype(dt)
|
||||||
records = frappe.db.sql("""select name, item_code, description from `tab{0}`
|
records = frappe.db.sql("""select name, item_code, description from `tab{0}`
|
||||||
where description is not null """.format(dt), as_dict=1)
|
where ifnull(item_code, '') != '' and description is not null """.format(dt), as_dict=1)
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
for d in records:
|
for d in records:
|
||||||
if d.item_code and item_details.get(d.item_code) \
|
if item_details.get(d.item_code) and cstr(d.description) == item_details.get(d.item_code).description:
|
||||||
and cstr(d.description) == item_details.get(d.item_code).description:
|
|
||||||
desc = item_details.get(d.item_code).description
|
desc = item_details.get(d.item_code).description
|
||||||
image = item_details.get(d.item_code).image
|
image = item_details.get(d.item_code).image
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user