Thursday, April 2, 2020
37 changes · master
Enhancements to existing features
New work schedules now use the company's default calendar as their starting template instead of always using a generic 40-hour week. Personal calendars are also linked with company-wide time off, helping keep employee availability and absences more consistent across HR and timesheet planning.
Original PR description
Before this commit, all new created calendar attendances used "40 hours" as default template. With this commit, new generated calendar attendance will use the company's default calendar as the template This commit also link specific personal calendar with the company global time off. TaskId: 2181651 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds a shared way for Odoo to check whether one model belongs under another model. It helps features such as messaging, mailing, portal sharing, and SMS composition make these checks more consistently and reliably behind the scenes.
Original PR description
**Description of the issue/feature this PR addresses:** Adds a method to check if a model is a submodel of another model. May be useful for checking mixings. Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-
The bank journal form now hides bank account detail fields until a bank account is selected. This prevents users from entering information that would disappear after saving, making the form clearer and reducing confusion.
Original PR description
Showing these fields does not actually make sense when bank_account_id isn't set as well, since setting them and saving will result in them losing their value (as they're actually related on an empty field). We need to hide them while bank_account_id is not set.
Payroll now offers a configuration menu for working time and updates work entries automatically when company-wide or global time off changes. When different types of leave overlap, payroll applies a clear priority order so employee work entries are generated more consistently.
Original PR description
- Add a new menu in Payroll/Configuration to setup the working time - Rewrite the CRUD operations for resource_calendar_leave, so the work entries will be updated dynamically when Company global leaves or global leaves are modified - Personal leaves (hr_leave) and global leave (resource_calendar_leave) can overlap. And the work entries are generated by the priority as `Company Global Time Off` > `Global Time Off` > `Personal Leave` TaskId: 2181651
Resolved issues and error corrections
Invoice analysis now shows all amounts consistently in the company currency, improving accuracy when reporting across multiple companies. The default report view is also more useful for business review, with customer-focused filtering, monthly grouping, and a line chart presentation.
Original PR description
Task [2206699](https://www.odoo.com/web#id=2206699&action=333&active_id=967&model=project.task&view_type=form&cids=1&menu_id=4720)
* All the amounts are now expressed in the company currency
- The amounts are taken from debit/credit on the aml
- When opening the report for multiple companies, convert in the
current company's currency
* New default view:
- Group by month instead of category
- Line chart instead of bar chart
- Filter on customers
* Remove useless fields:
- name
- invoice_partner_bank_id
- invoice_payment_term_id
- residual (including taxes)
- amount_total (including taxes)
- nbr_lines as it is a generic feature
* Rename currency_id to the more correct company_currency_id
* Remove useless group_by clause from the SQL query
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prMiscellaneous changes
1) Add a hidden optional field to the timesheet tree view. 2) Try to display that field by checking the checkbox. => the column appears then directly disappears. Asynchronous calls (here: fetching the server time) should always be in the `willStart` method. Task 2204084 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48645
Original PR description
1) Add a hidden optional field to the timesheet tree view. 2) Try to display that field by checking the checkbox. => the column appears then directly disappears. Asynchronous calls (here: fetching the server time) should always be in the `willStart` method. Task 2204084 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48645
Fixed an issue where slowly zooming across an employee image could make the zoomed image disappear too early. The change improves the image preview experience by accounting for the full visible width, including borders.
Original PR description
Currently when zoom slowly from right to left on employee image it will not zoom the image. currently to hide the zoom image we used target.width() and the method width gives the width of the selected element (excluding padding, border and margin) so due to border excluded it will hide the zooming image. so instead of method width we used method outerWidth which gives width of the selected element (including padding and border, excluding margin). Task: 2199218 Closes: #46619 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Calendar events in the month view are now displayed according to their scheduled time instead of the order they were created. This makes daily agendas easier to read and prevents later events from appearing above earlier ones.
Original PR description
Before this commit, events were sorted by ID in the month view. Events A occurring after event B would be placed on top of B. We force an event to be "allday" when the view is in month. So the sequence can't be on the time but on his ID. After this commit, we don't force the allday flag anymore Steps to reproduce: * Go in the calendar app * Insert a event at 12:00 * Insert a event at 8:00 * Insert a event at 14:00 * Go in view month the events are not sorted (BUG) Task Id: 2183249 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Calendar month view entries are now sorted by their actual event timing instead of an internal ID. This prevents later events from appearing above earlier ones, making schedules easier to read and trust.
Original PR description
Before this commit, events were sorted by ID in the month view. Events `A` occurring after event `B` would be placed on top of `B`. Ticketid: 2183249 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This commit bring back the filters on Project Overview. TaskID: 2223820 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48524
Original PR description
This commit bring back the filters on Project Overview. TaskID: 2223820 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48524
### Issue - Preferences > Change your avatar with a big .gif - Install Forum - Go on a question The gif is not resized in the nav and in the post answer box ### Cause In fact, all gifs are not really resized. They just look fine because there is CSS to handle the case where the server resize does not work. ### Solution Do as it is done everywhere else, add CSS rules **OPW-2223260** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.co
Original PR description
### Issue - Preferences > Change your avatar with a big .gif - Install Forum - Go on a question The gif is not resized in the nav and in the post answer box ### Cause In fact, all gifs are not really resized. They just look fine because there is CSS to handle the case where the server resize does not work. ### Solution Do as it is done everywhere else, add CSS rules **OPW-2223260** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48390
[opw-2226421](https://www.odoo.com/web#id=2226421&action=333&active_id=49&model=project.task&view_type=form&cids=1&menu_id=4720) The analytic accounts are not set on creation of a new invoice from a Sale Order, and when they are set, the default should not override the values selected on the SO. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48656
Original PR description
[opw-2226421](https://www.odoo.com/web#id=2226421&action=333&active_id=49&model=project.task&view_type=form&cids=1&menu_id=4720) The analytic accounts are not set on creation of a new invoice from a Sale Order, and when they are set, the default should not override the values selected on the SO. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48656
- Have a clean V13 db with point_of_sale and account_accountant - General Settings => Accounting => Check "Anglo-Saxon Accounting" (debug mode) - Choose or create a storable product P with category C - Go to category C and set 'inventory valuation' to 'automated' - Open a new POS session PS - Sell product P with qty 1 - Pay - New order - Sell product P with qty -1 (refund) - Pay - Close session PS - Validate session PS Error "You are trying to reconcile some entries that are alrea
Original PR description
- Have a clean V13 db with point_of_sale and account_accountant - General Settings => Accounting => Check "Anglo-Saxon Accounting" (debug mode) - Choose or create a storable product P with category C - Go to category C and set 'inventory valuation' to 'automated' - Open a new POS session PS - Sell product P with qty 1 - Pay - New order - Sell product P with qty -1 (refund) - Pay - Close session PS - Validate session PS Error "You are trying to reconcile some entries that are already reconciled." will popup because the 0 sum AML is already marked as reconciled. This can be fixed by avoiding asking reconciliation when the amount_residual is 0. opw-2177881 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48696
### Issue - Install website - Create a carousel - Duplicate it The second one doesn't work ### Cause Because of this override: https://github.com/odoo/odoo/blob/13.0/addons/website/static/src/js/editor/snippets.options.js#L1635:L1637 All duplicate IDs are removed but it should only remove the ID of a duplicated anchor ### Solution Check if the target has `data-anchor` attribute **OPW-2222074** -- I confirm I have signed the CLA and read the PR guidelin
Original PR description
### Issue - Install website - Create a carousel - Duplicate it The second one doesn't work ### Cause Because of this override: https://github.com/odoo/odoo/blob/13.0/addons/website/static/src/js/editor/snippets.options.js#L1635:L1637 All duplicate IDs are removed but it should only remove the ID of a duplicated anchor ### Solution Check if the target has `data-anchor` attribute **OPW-2222074** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48506
### Issue - Install Accounting & Studio - Accounting > Open studio - Reports > Invoices - Add a Field Column in the table and drag it after "Description" Some elements are shifted, which causes inconsistency in the table ### Cause In 924ca78068548078 we added a th "source document" with a td containing the value. In bc131c0cfb51c953 we removed the td but not the th. Studio adds hook after each th & td. Since there is th but no td, there is an inconsis
Original PR description
### Issue - Install Accounting & Studio - Accounting > Open studio - Reports > Invoices - Add a Field Column in the table and drag it after "Description" Some elements are shifted, which causes inconsistency in the table ### Cause In 924ca78068548078 we added a th "source document" with a td containing the value. In bc131c0cfb51c953 we removed the td but not the th. Studio adds hook after each th & td. Since there is th but no td, there is an inconsistency in the hooks. ### Solution Remove the th from the view to avoid having a useless hook. **OPW-2226726** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48702
- Add identical user-agent for the requests to OpenStreetMap - Improve the error message log -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48698
Original PR description
- Add identical user-agent for the requests to OpenStreetMap - Improve the error message log -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48698
### Issue - Install Website - Edit your website Do this 8 times: - Add the block "Image - Text" under each product - Make image on left smaller and text longer - Edit the size/color of the title and the description There is some case where it will crash ### Cause We override the method who gets the editor: `x = $('[data-note-id="' + list.last($target.attr('id')) + '"]');` When there is more than
Original PR description
### Issue
- Install Website
- Edit your website
Do this 8 times:
- Add the block "Image - Text" under each product
- Make image on left smaller and text longer
- Edit the size/color of the title and the description
There is some case where it will crash
### Cause
We override the method who gets the editor:
`x = $('[data-note-id="' + list.last($target.attr('id')) + '"]');`
When there is more than 9 editors in the page
(because we edited 10 different HTML fields), we reach the
editor with ID 10 but the code erroneously will not find the
editor with ID 0
### Solution
Use this instead:
```
x = $('[data-note-id="' + list.last($target.attr('id').split('-')) + '"]');
```
OPW-2218467
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#48712Steps to reproduce the bug: - Let's consider an instance with crm_iap_lead and crm_iap_lead_enrich installed - Uninstall crm Bug: An error was raised: ('Record does not exist or has been deleted.\n(Record: ir.model.fields(15085,), User: 1)', None) because the field reveal_id is shared on model crm.lead and modules crm_iap_lead and crm_iap_lead_enrich are independent from each other. opw:2224952 Forward-Port-Of: odoo/odoo#48658
Original PR description
Steps to reproduce the bug:
- Let's consider an instance with crm_iap_lead and crm_iap_lead_enrich installed
- Uninstall crm
Bug:
An error was raised: ('Record does not exist or has been deleted.\n(Record: ir.model.fields(15085,), User: 1)', None)
because the field reveal_id is shared on model crm.lead and modules crm_iap_lead and crm_iap_lead_enrich are independent
from each other.
opw:2224952
Forward-Port-Of: odoo/odoo#48658If a user with Sales rights but no Accounting rights is trying to send an already paid invoice, it will raise an access rights error before this commit while we should allow him to send it without error. Description of the issue/feature this PR addresses: opw-2226709 Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48769 Forward-Port-Of: odoo/o
Original PR description
If a user with Sales rights but no Accounting rights is trying to send an already paid invoice, it will raise an access rights error before this commit while we should allow him to send it without error. Description of the issue/feature this PR addresses: opw-2226709 Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48769 Forward-Port-Of: odoo/odoo#48706
Since the wizard to set a logo and chose a layout has been removed, we don't need anymore to throw an error if they are not set because the report can be generated. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48760 Forward-Port-Of: odoo/odoo#48662
Original PR description
Since the wizard to set a logo and chose a layout has been removed, we don't need anymore to throw an error if they are not set because the report can be generated. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48760 Forward-Port-Of: odoo/odoo#48662
In some situations, the context can contain a default journal id. When creating the cash basis entry, we are correctly retrieving the Cash Basis Journal for the account.move, but as we do not explicitly set the journal on the account.move.line also, it is using the context default value for journal_id (usually the customer invoices journal). As journal_id on account.move.line is a related field to journal_id of account.move, we are wrongly updating it. We should populate journal_id on accou
Original PR description
In some situations, the context can contain a default journal id. When creating the cash basis entry, we are correctly retrieving the Cash Basis Journal for the account.move, but as we do not explicitly set the journal on the account.move.line also, it is using the context default value for journal_id (usually the customer invoices journal). As journal_id on account.move.line is a related field to journal_id of account.move, we are wrongly updating it. We should populate journal_id on account.move.line explicitly to avoid this. Description of the issue/feature this PR addresses: opw-2189918 Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48811 Forward-Port-Of: odoo/odoo#48510
Steps to reproduce the bug: - Module website is installed - Multi companies is set - Go to Website > Settings - Remove the company for the current website and save Bug: A traceback was raised opw:2228183 Forward-Port-Of: odoo/odoo#48726
Original PR description
Steps to reproduce the bug: - Module website is installed - Multi companies is set - Go to Website > Settings - Remove the company for the current website and save Bug: A traceback was raised opw:2228183 Forward-Port-Of: odoo/odoo#48726
Using the `complete_name` allows searching more easily in case several sub-locations have the same name. Closes #38733 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48815
Original PR description
Using the `complete_name` allows searching more easily in case several sub-locations have the same name. Closes #38733 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48815
Steps to reproduce the bug: - Let's consider a vendor V with a supplier currency € - Let's consider the current company's user C in $ - Let's consider two vendor bills journals J1 in € and J2 in $ from C - Create a vendor bill for V Bug: The default currency was $ instead of € and the default journal was J2 instead of J1. This fix keeps the same behavior as implemented in 82794c8662e23e837e239ebcc6d589f063fab524 opw:2226115 Forward-Port-Of: odoo/odoo#48781 Forward-Port-Of: odoo/
Original PR description
Steps to reproduce the bug: - Let's consider a vendor V with a supplier currency € - Let's consider the current company's user C in $ - Let's consider two vendor bills journals J1 in € and J2 in $ from C - Create a vendor bill for V Bug: The default currency was $ instead of € and the default journal was J2 instead of J1. This fix keeps the same behavior as implemented in 82794c8662e23e837e239ebcc6d589f063fab524 opw:2226115 Forward-Port-Of: odoo/odoo#48781 Forward-Port-Of: odoo/odoo#48669
`Products` and `Stock Move Lines` are main models, for which the creation is batch happens frequently. Their creation in batch shouldn't be split because of one "create single" override. Forward-Port-Of: odoo/odoo#48838
Original PR description
`Products` and `Stock Move Lines` are main models, for which the creation is batch happens frequently. Their creation in batch shouldn't be split because of one "create single" override. Forward-Port-Of: odoo/odoo#48838
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48830
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48830
Similar to 186b599246321465eae937b875b6c970656b145a opw-2229306 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48819
Original PR description
Similar to 186b599246321465eae937b875b6c970656b145a opw-2229306 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48819
Avoid messing up with style Forward-Port-Of: odoo/odoo#48867 Forward-Port-Of: odoo/odoo#48832
Original PR description
Avoid messing up with style Forward-Port-Of: odoo/odoo#48867 Forward-Port-Of: odoo/odoo#48832
It is supported in V10 https://github.com/odoo/odoo/blob/10.0/addons/report/views/layout_templates.xml#L201 and by wkhtml But it is removed here https://github.com/odoo/odoo/commit/b446930dc42479f524eab7e677c5b2007f9fa0a6, without explication. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47140
Original PR description
It is supported in V10 https://github.com/odoo/odoo/blob/10.0/addons/report/views/layout_templates.xml#L201 and by wkhtml But it is removed here https://github.com/odoo/odoo/commit/b446930dc42479f524eab7e677c5b2007f9fa0a6, without explication. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47140
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48883
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48883
Forward-Port-Of: odoo/enterprise#9617
Original PR description
Forward-Port-Of: odoo/enterprise#9617
Avoid error on tests when l10n_generic_coa is not installed: ``` Traceback (most recent call last): File "/root/enterprise/account_followup/tests/test_followup.py", line 263, in setUpClass super(TestAccountFollowupReports, cls).setUpClass() File "/root/enterprise/account_reports/tests/common.py", line 46, in setUpClass cls.skipTest("l10n_generic_coa not installed") TypeError: skipTest() missing 1 required posit
Original PR description
Avoid error on tests when l10n_generic_coa is not installed:
```
Traceback (most recent call last):
File "/root/enterprise/account_followup/tests/test_followup.py",
line 263, in setUpClass
super(TestAccountFollowupReports, cls).setUpClass()
File "/root/enterprise/account_reports/tests/common.py",
line 46, in setUpClass
cls.skipTest("l10n_generic_coa not installed")
TypeError: skipTest() missing 1 required positional
argument: 'reason'
```
Now:

Forward-Port-Of: odoo/enterprise#9603
Forward-Port-Of: odoo/enterprise#9599In the next case: 1. Create a customer invoice for 1000.00 MXN 2. Create a refund by 200.00 MXN 3. Make a payment for 800.00 MXN The credit note not must be considered on the amount paid. This was an error since the parameter 'invoice_id' was changed by 'move_id' on the `_get_reconciled_info_JSON_values` method. Added new test case. OPW#2224292 Forward-Port-Of: odoo/enterprise#9541
Original PR description
In the next case: 1. Create a customer invoice for 1000.00 MXN 2. Create a refund by 200.00 MXN 3. Make a payment for 800.00 MXN The credit note not must be considered on the amount paid. This was an error since the parameter 'invoice_id' was changed by 'move_id' on the `_get_reconciled_info_JSON_values` method. Added new test case. OPW#2224292 Forward-Port-Of: odoo/enterprise#9541
We should subtract the correct datetime fields to avoid a TypeError. opw-2227020 Forward-Port-Of: odoo/enterprise#9558
Original PR description
We should subtract the correct datetime fields to avoid a TypeError. opw-2227020 Forward-Port-Of: odoo/enterprise#9558
Before this commit: - Install `timesheet_grid` - Uninstall `timesheet_grid` -> The menu for the Timesheet app remains in the app switcher This is confusing for the end-user as it looks like the application they installed did not uninstall successfully and may become worried about their billing. This behaviour happens because the root menu for the Timesheets app is defined inside the technical module `hr_timesheet` which is a dependence of `timesheet_grid`, this module is
Original PR description
Before this commit:
- Install `timesheet_grid`
- Uninstall `timesheet_grid`
-> The menu for the Timesheet app remains in the app switcher
This is confusing for the end-user as it looks like the application they
installed did not uninstall successfully and may become worried about
their billing.
This behaviour happens because the root menu for the Timesheets app is
defined inside the technical module `hr_timesheet` which is a dependence
of `timesheet_grid`, this module is not automatically uninstalled when
`timesheet_grid` is uninstalled, thus leaving the root menu untouched.
To solve this, we archive the aforementioned root menu during the
uninstall of `timesheet_grid` and we re-activate it upon its
reinstallation.
opw-2221228
Forward-Port-Of: odoo/enterprise#9458- Set your company currency (C1) to USD - Create a new company (C2) with currency EUR - Go to any dashboard, e.g. Purchase - Switch from C1 to C2 The currency remains USD, i.e. the currency of C1. This is because the currency is set at the server level based on the default company of the user. This is not correct in a multi-currency environment since the current company is set client-side. We can retrive the current company from: https://github.com/odoo/odoo/blob/b66bcfe96dfdc62
Original PR description
- Set your company currency (C1) to USD - Create a new company (C2) with currency EUR - Go to any dashboard, e.g. Purchase - Switch from C1 to C2 The currency remains USD, i.e. the currency of C1. This is because the currency is set at the server level based on the default company of the user. This is not correct in a multi-currency environment since the current company is set client-side. We can retrive the current company from: https://github.com/odoo/odoo/blob/b66bcfe96dfdc62a1faa26ccf9c6adfa2b8929a4/addons/web/static/src/js/chrome/abstract_web_client.js#L132 The current company is the first allowed company, as used in: https://github.com/odoo/odoo/blob/b66bcfe96dfdc62a1faa26ccf9c6adfa2b8929a4/addons/web/static/src/js/widgets/switch_company_menu.js#L42 We add the currency per company in the session for convenience in `companies_currency_id`, but keep `company_currency_id` for compatibility. opw-2224377 Forward-Port-Of: odoo/enterprise#9476
TaskID: 2229625 Forward-Port-Of: odoo/enterprise#9605
Original PR description
TaskID: 2229625 Forward-Port-Of: odoo/enterprise#9605