Skip to content
Snippets Groups Projects
Commit 18b5ad16 authored by Laurent Smet's avatar Laurent Smet
Browse files

[FIX] account: Fix unbalanced journal entry when switching payment terms


When switching immediate payment term to 30% advance then back to immediate payment term, the receivable line is back to its previous value.
This is due to the '_get_fields_onchange_balance' that is not updating correctly the business fields since price_subtotal == amount_currency.
So, when `writing`, debit/credit are removed from the dictionary because the values are the same as before. However, `price_unit` hasn't be updated with the new value and remains as its previous value.
It leads to a recomputation of accounting fields regarding the business fields and then, trigger the unbalanced journal entry.

closes odoo/odoo#60614

Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
parent ca6cc05c
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment