<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/core/session.js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] web: do not use default en_US lang when loading translations from session</title>
<updated>2021-04-15T13:07:02+00:00</updated>
<author>
<name>Anh Thao Pham (pta)</name>
<email>pta@odoo.com</email>
</author>
<published>2021-04-15T11:24:24+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3de9f5953d84f579dc1a4f5ed52e263a1e2c932f'/>
<id>3de9f5953d84f579dc1a4f5ed52e263a1e2c932f</id>
<content type='text'>
When loading translations from Session, if no lang is defined in context or html,
it is loading translations of en_US lang by default.
No default should be used to fallback on the language of the current user.

opw-2501708

closes odoo/odoo#69318

X-original-commit: a93a0a33c7447505403097c7ba0707d55d252e64
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: Anh Thao PHAM &lt;kitan191@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When loading translations from Session, if no lang is defined in context or html,
it is loading translations of en_US lang by default.
No default should be used to fallback on the language of the current user.

opw-2501708

closes odoo/odoo#69318

X-original-commit: a93a0a33c7447505403097c7ba0707d55d252e64
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: Anh Thao PHAM &lt;kitan191@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: load_translation fallback to url language</title>
<updated>2020-06-17T11:32:01+00:00</updated>
<author>
<name>jvm-odoo</name>
<email>jvm@odoo.com</email>
</author>
<published>2020-06-17T07:48:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=93479ad005bd69b269a662003e70163d0f405e05'/>
<id>93479ad005bd69b269a662003e70163d0f405e05</id>
<content type='text'>
This commit is fine tuning of 9f142c8ff5a383.

Apparently, context_get callback is never called. I
guess this is due to the fact that we are higher.

context_get is defined in public/public_root.js and
we are in core/session.js

The only way to fix is to retrieve the HTML tag language.

OPW-2244843

closes odoo/odoo#53155

X-original-commit: 2bbb8fbf7ae909da03d97d16b228ae5a95de7d18
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit is fine tuning of 9f142c8ff5a383.

Apparently, context_get callback is never called. I
guess this is due to the fact that we are higher.

context_get is defined in public/public_root.js and
we are in core/session.js

The only way to fix is to retrieve the HTML tag language.

OPW-2244843

closes odoo/odoo#53155

X-original-commit: 2bbb8fbf7ae909da03d97d16b228ae5a95de7d18
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: load_translation fallback to url language</title>
<updated>2020-06-11T14:53:25+00:00</updated>
<author>
<name>jvm-odoo</name>
<email>jvm@odoo.com</email>
</author>
<published>2020-06-10T08:46:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=149763f372e58c26c4af29a995314d102dfa03ba'/>
<id>149763f372e58c26c4af29a995314d102dfa03ba</id>
<content type='text'>
Issue

	- Install eCommerce, Sales, Stock, Product availability
	- Install another language &amp; add it to website too
	- Create a product
		- eCommerce tab select 'Availability Show ':
		  inventory below a threshold and prevent
		  sales if not enough stock
	- Go to website, publish it
	- Private tab &gt; go on your website url
	- Open the product page
	Availability text should show up
	- Switch language without debugger open
	Availability text not translated
	- Open debugger with disable cache
	- Refresh
	Availability text translated

Cause

	In this case, we have no user_context,
	but the load_translation is based on
	the user_context language.

	Since lang = undefined, we use the cached language

Solution

	Fallback to the context language if the user_context
	langague is not defined

OPW-2244843

closes odoo/odoo#52868

X-original-commit: a9a756cf75963e0771a05859b29b03f08ae592b1
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue

	- Install eCommerce, Sales, Stock, Product availability
	- Install another language &amp; add it to website too
	- Create a product
		- eCommerce tab select 'Availability Show ':
		  inventory below a threshold and prevent
		  sales if not enough stock
	- Go to website, publish it
	- Private tab &gt; go on your website url
	- Open the product page
	Availability text should show up
	- Switch language without debugger open
	Availability text not translated
	- Open debugger with disable cache
	- Refresh
	Availability text translated

Cause

	In this case, we have no user_context,
	but the load_translation is based on
	the user_context language.

	Since lang = undefined, we use the cached language

Solution

	Fallback to the context language if the user_context
	langague is not defined

OPW-2244843

closes odoo/odoo#52868

X-original-commit: a9a756cf75963e0771a05859b29b03f08ae592b1
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] web: add owl 1.0.0-beta1 to odoo</title>
<updated>2019-12-09T11:09:10+00:00</updated>
<author>
<name>Géry Debongnie</name>
<email>ged@odoo.com</email>
</author>
<published>2019-08-23T13:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=29726e8fd000cb09075f9b6b2a6a8d2ddaf4ef58'/>
<id>29726e8fd000cb09075f9b6b2a6a8d2ddaf4ef58</id>
<content type='text'>
With this commit, we properly introduce the Owl library into our beloved
codebase. More information on the Owl library can be found in the project
repository: https://github.com/odoo/owl/

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this commit, we properly introduce the Owl library into our beloved
codebase. More information on the Owl library can be found in the project
repository: https://github.com/odoo/owl/

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: use language week_start in datepickers</title>
<updated>2019-10-11T09:15:43+00:00</updated>
<author>
<name>fw-bot</name>
<email>otis@odoo.com</email>
</author>
<published>2019-10-10T13:10:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3a2c69edbf4015107d5e68104e1c28bf74fcd1d8'/>
<id>3a2c69edbf4015107d5e68104e1c28bf74fcd1d8</id>
<content type='text'>
Before this rev., if the week_start param (the first day of week)
of the user language was changed, it wasn't reflected on datepickers
(however, it worked fine in the calendar view). This rev. makes this
work by updating the moment locale with the corresponding param.

Fixes #36450
Closes #36532

closes odoo/odoo#38472

X-original-commit: eeb518316f25d652bea3ec6d387db6ad93284fb2
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this rev., if the week_start param (the first day of week)
of the user language was changed, it wasn't reflected on datepickers
(however, it worked fine in the calendar view). This rev. makes this
work by updating the moment locale with the corresponding param.

Fixes #36450
Closes #36532

closes odoo/odoo#38472

X-original-commit: eeb518316f25d652bea3ec6d387db6ad93284fb2
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: unused on_modules_loaded hook</title>
<updated>2019-07-18T09:17:52+00:00</updated>
<author>
<name>Pierre Paridans</name>
<email>app@odoo.com</email>
</author>
<published>2019-07-12T09:52:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1bfdf9219d634f75e44b2b2440e14958080cd981'/>
<id>1bfdf9219d634f75e44b2b2440e14958080cd981</id>
<content type='text'>
`window.openerp` being undefined, the method `on_modules_loaded` throws
an error when reaching its purpose (loading additional modules)...

The commit odoo/odoo@905e01921f3c3ef43ace6fc537d1d8c0d280002c removed
the compatibility layer for Odoo v8 (compatibility.js) which contained
the `window.openerp` declaration.

Being broken for that long without consequences, this feature proved to
not be useful anymore. We then remove it.

closes odoo/odoo#34821

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`window.openerp` being undefined, the method `on_modules_loaded` throws
an error when reaching its purpose (loading additional modules)...

The commit odoo/odoo@905e01921f3c3ef43ace6fc537d1d8c0d280002c removed
the compatibility layer for Odoo v8 (compatibility.js) which contained
the `window.openerp` declaration.

Being broken for that long without consequences, this feature proved to
not be useful anymore. We then remove it.

closes odoo/odoo#34821

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: use new helper config.isDebug()</title>
<updated>2019-06-05T05:56:33+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2019-06-03T14:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=72f7139f52a2702ced50730916fe3972bd2d8f09'/>
<id>72f7139f52a2702ced50730916fe3972bd2d8f09</id>
<content type='text'>
Before this commit, both config and session were aliases to odoo.debug.
Now, config.isDebug() should be call, with possibility to pass a parameter to
check if we are in a specific debug mode such as 'tests' or 'assets'.

task-1934445
Coming with https://github.com/odoo/enterprise/pull/4281
Closes https://github.com/odoo/odoo/pull/33213</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, both config and session were aliases to odoo.debug.
Now, config.isDebug() should be call, with possibility to pass a parameter to
check if we are in a specific debug mode such as 'tests' or 'assets'.

task-1934445
Coming with https://github.com/odoo/enterprise/pull/4281
Closes https://github.com/odoo/odoo/pull/33213</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web, web_tour, website, point_of_sale: adapt code to new debug</title>
<updated>2019-06-05T05:56:33+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2019-06-03T14:26:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3c37e0e1100c77a1e344f5153be756f12c3c777b'/>
<id>3c37e0e1100c77a1e344f5153be756f12c3c777b</id>
<content type='text'>
As now the debug state is stored in session, the JS framework code and some
templates needed some changes.
First, the debug state is retrieved from session and not the URL anymore.
Second, the debug state does not need to be forwarded as it is now persistent.

task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As now the debug state is stored in session, the JS framework code and some
templates needed some changes.
First, the debug state is retrieved from session and not the URL anymore.
Second, the debug state does not need to be forwarded as it is now persistent.

task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base,web: Improve webclient startup</title>
<updated>2019-05-20T08:52:18+00:00</updated>
<author>
<name>Vincent Schippefilt</name>
<email>vsc@odoo.com</email>
</author>
<published>2019-04-19T10:10:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8a28cc22fd242f5fb59f23d1443ed8ed438249d7'/>
<id>8a28cc22fd242f5fb59f23d1443ed8ed438249d7</id>
<content type='text'>
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates

After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).

The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates

2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.

Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.

Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates

After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).

The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates

2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.

Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.

Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: Contextualize the multi company</title>
<updated>2019-05-13T08:57:49+00:00</updated>
<author>
<name>Yannick Tivisse</name>
<email>yti@odoo.com</email>
</author>
<published>2019-04-25T15:42:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a5b6f31cf28e5381e1c85f66730bcdb55998e643'/>
<id>a5b6f31cf28e5381e1c85f66730bcdb55998e643</id>
<content type='text'>
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -&gt; Traceback -&gt; Log into
the correct company, re-copy/paste -&gt; Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -&gt; Traceback -&gt; Log into
the correct company, re-copy/paste -&gt; Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;</pre>
</div>
</content>
</entry>
</feed>
