Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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: #25057 #17196 #9972 Final Goal - Being able to perform the computation of the debits and credits according to l10n_mx in odoo/enterprise#3137 closes #28991
- Loading branch information