mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
Merge pull request #40622 from ruthra-kumar/refactor_flag_update_patch
refactor: reset update_outstanding_for_self flag for old records
This commit is contained in:
@@ -2180,7 +2180,8 @@
|
|||||||
"fieldname": "update_outstanding_for_self",
|
"fieldname": "update_outstanding_for_self",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Update Outstanding for Self",
|
"label": "Update Outstanding for Self",
|
||||||
"no_copy": 1
|
"no_copy": 1,
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-file-text",
|
"icon": "fa fa-file-text",
|
||||||
@@ -2193,7 +2194,7 @@
|
|||||||
"link_fieldname": "consolidated_invoice"
|
"link_fieldname": "consolidated_invoice"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2024-03-20 16:02:52.237732",
|
"modified": "2024-03-22 17:50:34.395602",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ erpnext.patches.v14_0.update_total_asset_cost_field
|
|||||||
erpnext.patches.v15_0.create_advance_payment_status
|
erpnext.patches.v15_0.create_advance_payment_status
|
||||||
erpnext.patches.v15_0.allow_on_submit_dimensions_for_repostable_doctypes
|
erpnext.patches.v15_0.allow_on_submit_dimensions_for_repostable_doctypes
|
||||||
erpnext.patches.v14_0.create_accounting_dimensions_in_reconciliation_tool
|
erpnext.patches.v14_0.create_accounting_dimensions_in_reconciliation_tool
|
||||||
erpnext.patches.v14_0.update_flag_for_return_invoices
|
erpnext.patches.v14_0.update_flag_for_return_invoices #2024-03-22
|
||||||
# below migration patch should always run last
|
# below migration patch should always run last
|
||||||
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
|
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
|
||||||
erpnext.stock.doctype.delivery_note.patches.drop_unused_return_against_index # 2023-12-20
|
erpnext.stock.doctype.delivery_note.patches.drop_unused_return_against_index # 2023-12-20
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ def execute():
|
|||||||
creation_date = "2024-01-25"
|
creation_date = "2024-01-25"
|
||||||
|
|
||||||
si = qb.DocType("Sales Invoice")
|
si = qb.DocType("Sales Invoice")
|
||||||
|
|
||||||
|
# unset flag, as migration would have set it for all records, as the field was introduced with default '1'
|
||||||
|
qb.update(si).set(si.update_outstanding_for_self, False).run()
|
||||||
|
|
||||||
if cr_notes := (
|
if cr_notes := (
|
||||||
qb.from_(si)
|
qb.from_(si)
|
||||||
.select(si.name)
|
.select(si.name)
|
||||||
@@ -37,6 +41,10 @@ def execute():
|
|||||||
).run()
|
).run()
|
||||||
|
|
||||||
pi = qb.DocType("Purchase Invoice")
|
pi = qb.DocType("Purchase Invoice")
|
||||||
|
|
||||||
|
# unset flag, as migration would have set it for all records, as the field was introduced with default '1'
|
||||||
|
qb.update(pi).set(pi.update_outstanding_for_self, False).run()
|
||||||
|
|
||||||
if dr_notes := (
|
if dr_notes := (
|
||||||
qb.from_(pi)
|
qb.from_(pi)
|
||||||
.select(pi.name)
|
.select(pi.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user