Merge pull request #40625 from frappe/mergify/bp/version-14-hotfix/pr-40622

refactor: reset update_outstanding_for_self flag for old records (backport #40622)
This commit is contained in:
ruthra kumar
2024-03-24 16:24:37 +05:30
committed by GitHub
3 changed files with 12 additions and 3 deletions

View File

@@ -12,6 +12,10 @@ def execute():
creation_date = "2024-01-25"
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 := (
qb.from_(si)
.select(si.name)
@@ -37,6 +41,10 @@ def execute():
).run()
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 := (
qb.from_(pi)
.select(pi.name)