diff options
| author | Denis Ledoux <dle@odoo.com> | 2017-02-01 15:53:16 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2017-02-01 16:01:34 +0100 |
| commit | 6d1df94614218753957e106452d3a43619a0dbe2 (patch) | |
| tree | a3d0565023e686ab84c014f7c0d798f46e047653 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 02cfb7be835133ce40a7a79abe1894959a1e17ed (diff) | |
[FIX] account: payment term currency
This is related to revision
52db42d3dfd7c0942d96fd9dfe4f80fd7eddedcf
The total sent to the `compute` method is always
within the invoice company currency, not
in the invoice currency.
`total` comes from the first tuple result
of the method `compute_invoice_totals`,
which is always in the invoice company currency.
if the company currency is different than
the invoice currency,
the total is the sum of the `line['price']`
converted to the company currency, as stated
by
`line['price'] = currency.compute(line['price'], company_currency)`
and
`total += line['price']`
In the above revision, the possibility to pass
its own currency in the context is added. This is in case
the payment term used comes from another company
than the one of the invoice (see the commit message of the revision).
The mistake was to use the invoice currency, while it should
use the invoice company currency, as the `total` amount is
within the invoice company currency, not the invoice currency.
opw-705604
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
