mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: patch to migrate checkbox data into select
(cherry picked from commit c36fa5bdb6)
# Conflicts:
# erpnext/patches.txt
This commit is contained in:
@@ -465,5 +465,9 @@ erpnext.patches.v16_0.set_ordered_qty_in_quotation_item
|
|||||||
erpnext.patches.v16_0.migrate_transaction_deletion_task_flags_to_status # 2
|
erpnext.patches.v16_0.migrate_transaction_deletion_task_flags_to_status # 2
|
||||||
erpnext.patches.v16_0.update_company_custom_field_in_bin
|
erpnext.patches.v16_0.update_company_custom_field_in_bin
|
||||||
erpnext.patches.v15_0.replace_http_with_https_in_sales_partner
|
erpnext.patches.v15_0.replace_http_with_https_in_sales_partner
|
||||||
|
<<<<<<< HEAD
|
||||||
erpnext.patches.v15_0.delete_quotation_lost_record_detail
|
erpnext.patches.v15_0.delete_quotation_lost_record_detail
|
||||||
erpnext.patches.v16_0.add_portal_redirects
|
erpnext.patches.v16_0.add_portal_redirects
|
||||||
|
=======
|
||||||
|
erpnext.patches.v16_0.migrate_asset_type_checkboxes_to_select
|
||||||
|
>>>>>>> c36fa5bdb6 (fix: patch to migrate checkbox data into select)
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import frappe
|
||||||
|
from frappe.query_builder import Case
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
Asset = frappe.qb.DocType("Asset")
|
||||||
|
|
||||||
|
frappe.qb.update(Asset).set(
|
||||||
|
Asset.asset_type,
|
||||||
|
Case()
|
||||||
|
.when(Asset.is_existing_asset == 1, "Existing Asset")
|
||||||
|
.when(Asset.is_composite_asset == 1, "Composite Asset")
|
||||||
|
.when(Asset.is_composite_component == 1, "Composite Component")
|
||||||
|
.else_(""),
|
||||||
|
).run()
|
||||||
Reference in New Issue
Block a user