diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-04-30 15:04:35 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-05-05 12:52:56 +0000 |
| commit | 458b952d019b8d99681326adc2c1748f8a1e3164 (patch) | |
| tree | 5e798ddd543e9e30ecd4d1751874481bad5719da /addons/web/static/src/js/fields/relational_fields.js | |
| parent | a3e61f54d1fe0096b3a06f6c1c5a39467b44a62b (diff) | |
[FIX] account: balance not rounded
- Set the Product Price precision to 5
- Create an invoice with one line:
No taxes
Price Unit: 0.895
- Save
An error is raised because of an unbalanced journal entry.
The root cause is the `balance` which is not rounded. This is due to the
fact that the currency field (`company_currency_id`) is a related and
not set at the moment of computation. This leads to this being equal to
`0.01` instead of zero:
https://github.com/odoo/odoo/blob/ed1926cb12c830f383dbe540cb96e14d0804eb3d/addons/account/models/account_payment_term.py#L64
Note that if the line is saved with another value then the price unit
is modified, the error doesn't occur since the balance is properly
rounded.
opw-2209543
closes odoo/odoo#50655
X-original-commit: bd4bf1fe759a70d0b44606f1b2a3b27f8e71971d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
0 files changed, 0 insertions, 0 deletions
