Defer Odoo writes to transaction.on_commit to prevent orphans #521
No reviewers
Labels
No labels
API
Billing
UI/UX
dependencies
bug
change
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
servala/servala-portal!521
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-org-creation-race"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Inverts the create-organization flow so Django becomes the source of truth: BillingEntity and Organization rows are saved synchronously with NULL Odoo IDs, and the Odoo res.partner / sale.order writes are scheduled via transaction.on_commit. If Django rolls back, the on_commit callbacks are discarded and no Odoo orphan is created.
d14d826d9fd2ffd0dbd2WIP: Defer Odoo writes to transaction.on_commit to prevent orphansto Defer Odoo writes to transaction.on_commit to prevent orphans