-
- Downloads
[FIX] account, purchase, sale, currency: companies rates
In Odoo 9.0, the field `company_id` has been moved from the `res.currency` model to the `res.currency.rate` model. The different reports applying the currency rates on the amount at date have not been updated according to this change. This includes the sales, purchases and invoices analysis report. Basically, before 9.0, there was one `res.currency` per existing currency per company. A simple `JOIN` on the `res_currency` table was therefore enough to apply the currency rate. From 9.0, the currency records are shared between companies. It's the rates (`res.currency.rate`) that can be set a on specific company. The simple `JOIN` on `res_currency` is therefore no longer enough: the company condition must be added. Only rates from the specific company (e.g the company of the invoice) must be considered, or rates without companies. We take the opportunity to factor out the method, so, if a correction must be done, it must be done in one place only. opw-669129
Showing
- addons/account/report/account_invoice_report.py 3 additions, 10 deletionsaddons/account/report/account_invoice_report.py
- addons/purchase/report/purchase_report.py 3 additions, 10 deletionsaddons/purchase/report/purchase_report.py
- addons/sale/report/sale_report.py 3 additions, 10 deletionsaddons/sale/report/sale_report.py
- openerp/addons/base/res/res_currency.py 18 additions, 0 deletionsopenerp/addons/base/res/res_currency.py
Loading
Please register or sign in to comment