fix(patch): update stock reconciliation current serial nos

When current serial nos are non-existing there shouldn't be any value in
current_serial_no field.

(cherry picked from commit 203f0086f8)
This commit is contained in:
Ankush Menat
2022-01-21 14:12:35 +05:30
committed by Ankush Menat
parent 0e413ef54e
commit 91887f215d
2 changed files with 12 additions and 0 deletions

View File

@@ -337,6 +337,7 @@ erpnext.patches.v13_0.item_naming_series_not_mandatory
erpnext.patches.v13_0.update_category_in_ltds_certificate
erpnext.patches.v13_0.create_ksa_vat_custom_fields
erpnext.patches.v13_0.rename_ksa_qr_field
erpnext.patches.v13_0.wipe_serial_no_field_for_0_qty
erpnext.patches.v13_0.disable_ksa_print_format_for_others # 16-12-2021
erpnext.patches.v13_0.update_tax_category_for_rcm
erpnext.patches.v13_0.convert_to_website_item_in_item_card_group_template

View File

@@ -0,0 +1,11 @@
import frappe
def execute():
sr_item = frappe.qb.DocType("Stock Reconciliation Item")
(frappe.qb
.update(sr_item)
.set(sr_item.current_serial_no, None)
.where(sr_item.current_qty == 0)
).run()