diff options
| author | jem-odoo <jem@openerp.com> | 2018-08-24 10:02:26 +0200 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2018-08-24 15:48:26 +0200 |
| commit | a7eb6832d197eb8a02fdc918b8065551136c5e2b (patch) | |
| tree | 4a7bd76488409c21b456b5642ce423f4b30adfec /addons/web/i18n/es.po | |
| parent | 3c4c6b955dd4ebef1e84434add031edc97b656f7 (diff) | |
[FIX] sale,pos_sale: use correct method to find conversion currency rate
Before this commit, if the currency of the company is not the reference
currency (rate = 1.0), then the conversion will be applied on the
sale.report with currency rate.
Example in the demo data:
- Company currency is USD
- Reference currency is EUR
- Currency rate of USD is 1.5289 (after 6th June)
Creating a SO with a total of 1000 USD in the USD company will
display 654.065 on the sale.report (= 1000 / 1.5289).
The applied computation simply takes the rate of the company currency,
which is not exactly correct. This does not cause many problem since,
usually, companies set their currency as the reference one
(with rate = 1).
Since e8f01b94ce8f4aeed7e573821bcfd73d6c20024c, the rate is stored,
offering the possibility to make the code more robust and covering
the case detailled above.
The correct computation to apply is the one defined in `_convert`
method: 1000 * (1.5289 / 1.5289) (amount * (src rate / dst rate)).
This commit makes the correct convertion rate stored, instead of
the currency rate.
Doing that allow us to keep currency rates in the sale_timesheet
reporting test case.
Diffstat (limited to 'addons/web/i18n/es.po')
0 files changed, 0 insertions, 0 deletions
