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.
This commit is contained in:
Ankush Menat 2022-01-21 14:12:35 +05:30 committed by Ankush Menat
parent 33c4a0b5a9
commit 203f0086f8
2 changed files with 12 additions and 0 deletions

View File

@ -318,6 +318,7 @@ erpnext.patches.v13_0.create_ksa_vat_custom_fields # 07-01-2022
erpnext.patches.v14_0.rename_ongoing_status_in_sla_documents
erpnext.patches.v14_0.migrate_crm_settings
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.v14_0.add_default_exit_questionnaire_notification_template
erpnext.patches.v13_0.update_tax_category_for_rcm

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()