mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix(patch): update_sre_from_voucher_details (#37649)
This commit is contained in:
@@ -3,13 +3,16 @@ from frappe.query_builder.functions import IfNull
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
sre = frappe.qb.DocType("Stock Reservation Entry")
|
columns = frappe.db.get_table_columns("Stock Reservation Entry")
|
||||||
(
|
|
||||||
frappe.qb.update(sre)
|
if set(["against_pick_list", "against_pick_list_item"]).issubset(set(columns)):
|
||||||
.set(sre.from_voucher_type, "Pick List")
|
sre = frappe.qb.DocType("Stock Reservation Entry")
|
||||||
.set(sre.from_voucher_no, sre.against_pick_list)
|
(
|
||||||
.set(sre.from_voucher_detail_no, sre.against_pick_list_item)
|
frappe.qb.update(sre)
|
||||||
.where(
|
.set(sre.from_voucher_type, "Pick List")
|
||||||
(IfNull(sre.against_pick_list, "") != "") & (IfNull(sre.against_pick_list_item, "") != "")
|
.set(sre.from_voucher_no, sre.against_pick_list)
|
||||||
)
|
.set(sre.from_voucher_detail_no, sre.against_pick_list_item)
|
||||||
).run()
|
.where(
|
||||||
|
(IfNull(sre.against_pick_list, "") != "") & (IfNull(sre.against_pick_list_item, "") != "")
|
||||||
|
)
|
||||||
|
).run()
|
||||||
|
|||||||
Reference in New Issue
Block a user