805d2c08202a6bfed6a1e582740b63becf5ddf04
Steps to reproduce: Select a company whose currency is USD. Create an invoice in EUR. Go to the "Journal Items" tab. The amounts in the "Debit" and "Credit" columns are correct, but the currency symbol is € (invoice currency) instead of $ (company currency). This should not happen since both of these fields have `currency_field='company_currency_id'` in their definition: https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/account/models/account_move_line.py#L90-L99 But since those fields fulfill the conditions in `canUseFormatter`: https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/web/static/src/views/list/list_renderer.xml#L228-L229 `currencyField` remains undifined in the `formatOptions` when going through `getFormattedValue`: https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/web/static/src/views/list/list_renderer.js#L722-L734 Which is why the current fix looks at `options.field.currency_field` before falling back to `currency_id` when setting `currencyField`. A test is also added to make sure the issue does not creep back in again. closes odoo/odoo#101995 X-original-commit: a860370b8ed73c192c652b4a97ac0aa1d1c23936 Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com> Co-authored-by: Habib (ayh) <ayh@odoo.com> Co-authored-by: John Laterre (jol) <jol@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%