mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 08:05:00 +00:00
fix: patch for existing data
This commit is contained in:
@@ -444,3 +444,4 @@ erpnext.patches.v16_0.rename_subcontracted_quantity
|
||||
erpnext.patches.v16_0.add_new_stock_entry_types
|
||||
erpnext.patches.v15_0.set_asset_status_if_not_already_set
|
||||
erpnext.patches.v15_0.toggle_legacy_controller_for_period_closing
|
||||
erpnext.patches.v16_0.update_serial_batch_entries
|
||||
|
||||
17
erpnext/patches/v16_0/update_serial_batch_entries.py
Normal file
17
erpnext/patches/v16_0/update_serial_batch_entries.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.db.has_table("Serial and Batch Entry"):
|
||||
frappe.db.sql(
|
||||
"""
|
||||
UPDATE `tabSerial and Batch Entry` SABE, `tabSerial and Batch Bundle` SABB
|
||||
SET
|
||||
SABE.posting_datetime = SABB.posting_datetime,
|
||||
SABE.voucher_type = SABB.voucher_type,
|
||||
SABE.voucher_no = SABB.voucher_no,
|
||||
SABE.voucher_detail_no = SABB.voucher_detail_no,
|
||||
SABE.type_of_transaction = SABB.type_of_transaction
|
||||
WHERE SABE.parent = SABB.name
|
||||
"""
|
||||
)
|
||||
Reference in New Issue
Block a user