diff options
| author | Humberto Arocha <hbto@vauxoo.com> | 2018-10-18 21:42:13 +0000 |
|---|---|---|
| committer | Humberto Arocha <hbto@vauxoo.com> | 2018-12-06 19:39:16 +0000 |
| commit | 9d2d539a1631bc15516c75a100d8e0f305df2cd6 (patch) | |
| tree | 8cb5dcd102aaa2fb983aeaa2099fe1465fd945eb /addons/web/static/src/js/fields | |
| parent | 8db7d70776a276d153d62708c9b703b0b756dae6 (diff) | |
[IMP] account: Adding a method to allow the change of `amount_mnt` var
used to fetch debit & credit recorded in Tax Cash Basis Journal Entries
Main
-
By allowing to change the `amount_mnt` var we will be able to change the
values recorded in Tax Cash Basis Journal Entries, i.e, debit & credit
values.
Explanation
-
We want to keep the `amount` just the way it has been computed because
that is right. We don't want to change that.
Our issue is the`rounded_amt` which is the value that is passed to the
debit and credit downwards.
We have only hooked a new method to allow us later inherit that method
and make our own computations regarding the `rounded_amt` which is the
main subject of this PR and later pass it down to the debit & credit
fields as need for localizations that could be facing the problem of
having the computation of taxes at date of invoicing instead of date of
payment.
`amount` var is used here:
`
'amount_currency': self.amount_currency and
line.currency_id.round(-line.amount_currency * amount / line.balance) or
0.0,`
and we are not intending to change that because the value written to the
`amount_currency` field is right.
What we intend is to compute the values for debit and credit fields
which were computed in this method at invoice date, some l18n need them
at payment date, e.g, l18n_mx.
Be aware
-
Do not be mislead by the fact that `rounded_amt` var is the one taken to
do those computations. It is just a mean to the final goal. Rounding is
not an issue and has never been.
Background
-
By allowing this merge to flow we will be able to address the following issues:
https://github.com/odoo/odoo/issues/25057
https://github.com/odoo/odoo/pull/17196
https://github.com/odoo/odoo/issues/9972
Final Goal
-
Being able to perform the computation of the debits and credits
according to l10n_mx in odoo/enterprise#3137
closes odoo/odoo#28991
Diffstat (limited to 'addons/web/static/src/js/fields')
0 files changed, 0 insertions, 0 deletions
