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:
parent
33c4a0b5a9
commit
203f0086f8
@ -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
|
||||
|
11
erpnext/patches/v13_0/wipe_serial_no_field_for_0_qty.py
Normal file
11
erpnext/patches/v13_0/wipe_serial_no_field_for_0_qty.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user