fixed rename field patches
This commit is contained in:
parent
92af795f12
commit
5745cf7600
@ -85,6 +85,7 @@ execute:frappe.delete_doc("DocType", "Purchase Request Item")
|
||||
erpnext.patches.v4_2.recalculate_bom_cost
|
||||
erpnext.patches.v4_2.fix_gl_entries_for_stock_transactions
|
||||
erpnext.patches.v4_2.update_requested_and_ordered_qty
|
||||
execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
|
||||
erpnext.patches.v4_4.make_email_accounts
|
||||
execute:frappe.delete_doc("DocType", "Contact Control")
|
||||
erpnext.patches.v4_2.discount_amount
|
||||
@ -94,7 +95,6 @@ erpnext.patches.v5_0.update_dn_against_doc_fields
|
||||
execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'")
|
||||
execute:frappe.reload_doc('stock', 'doctype', 'item')
|
||||
execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
|
||||
execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
|
||||
erpnext.patches.v5_0.set_default_company_in_bom
|
||||
erpnext.patches.v5_0.capacity_planning
|
||||
execute:frappe.reload_doc('crm', 'doctype', 'lead')
|
||||
|
@ -228,7 +228,6 @@ def execute():
|
||||
frappe.reload_doc("stock", "doctype", "item_variant")
|
||||
frappe.reload_doc("accounts", "doctype", "party_account")
|
||||
frappe.reload_doc("accounts", "doctype", "fiscal_year_company")
|
||||
frappe.reload_doc("workflow", "doctype", "workflow")
|
||||
|
||||
#rename table fieldnames
|
||||
for dn in rename_map:
|
||||
|
@ -41,12 +41,12 @@ buying_renamed_fields = (
|
||||
def execute():
|
||||
for doctypes, fields in [[selling_doctypes, selling_renamed_fields], [buying_doctypes, buying_renamed_fields]]:
|
||||
for dt in doctypes:
|
||||
meta = frappe.get_meta(dt)
|
||||
frappe.reload_doc(get_doctype_module(dt), "doctype", scrub(dt))
|
||||
table_columns = frappe.db.get_table_columns(dt)
|
||||
base_net_total = frappe.db.sql("select sum(ifnull({0}, 0)) from `tab{1}`".format(fields[0][1], dt))[0][0]
|
||||
if not base_net_total:
|
||||
for f in fields:
|
||||
if meta.get_field(f[0]):
|
||||
if f[0] in table_columns:
|
||||
rename_field(dt, f[0], f[1])
|
||||
|
||||
# Added new field "total_taxes_and_charges" in buying cycle, updating value
|
||||
|
Loading…
x
Reference in New Issue
Block a user