ImprovedHighlight of Weekly #001

Invoice amount due updates before saving

The amount due on journal entries is now computed live in the form. It also fixes unsaved invoice lines disappearing when an outstanding credit was added before saving.

Versions19.020.0
ModulesInvoicing account
AppAccounting

Pull requests and commits

BranchPull requestCommit
19.0odoo/odoo#288894 ↗84ff047f4e ↗
20.0odoo/odoo#289786 ↗ecb9deb3f4 ↗

Commit message

[IMP] account: Improve account move amount due computation

Before this commit, the account.move amount due field would only
update on record saving (as it depended on line_ids).
This caused a temporary out of sync situation between the total
and the amount due on the move form view.
This commit ensures that the amount due is computed even before
saving the record so that out-of-sync situation is avoided.

It also solves the following bug:
Repro steps:
1) Create a new invoice
2) Add a customer and save the record
3) Add some invoice lines
4) without saving, add a payment from the outstanding credit

Issue:
The added (unsaved) invoice lines are removed

Solution:
This commit forces a record save before assigning outstanding credit

task-6534794

My stack

Pick the versions and apps you run. Weekly digests, this week's table and All changes then show only what concerns you. Saved in this browser.

Versions
Apps
Modules