refactor: patch partner_website for old data

This commit is contained in:
ruthra kumar
2026-01-22 12:04:37 +05:30
parent 8cf31548f2
commit 8db29b0a81
2 changed files with 12 additions and 1 deletions

View File

@@ -461,4 +461,5 @@ erpnext.patches.v15_0.create_accounting_dimensions_in_advance_taxes_and_charges
execute:frappe.delete_doc_if_exists("Workspace Sidebar", "Opening & Closing")
erpnext.patches.v16_0.migrate_transaction_deletion_task_flags_to_status # 2
erpnext.patches.v16_0.set_ordered_qty_in_quotation_item
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

View File

@@ -0,0 +1,10 @@
import frappe
from frappe import qb
from pypika.functions import Replace
def execute():
sp = frappe.qb.DocType("Sales Partner")
qb.update(sp).set(sp.partner_website, Replace(sp.partner_website, "http://", "https://")).where(
sp.partner_website.rlike("^http://.*")
).run()