<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/addons/base/models/res_users.py, 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] *: update documentation links Following the recent reorganisation of the documentation in 12.0+, the majority of the documents have been moved and their old links are no longer valid. Some redirection rules will soon be deployed, but those rules might be dropped in some years and we want the links to still work, which is why we still replace the links to the new ones.</title>
<updated>2021-05-17T08:25:31+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2021-05-12T14:07:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=598dda32f48ffeb64cbd398c6ffb1fe7577468f2'/>
<id>598dda32f48ffeb64cbd398c6ffb1fe7577468f2</id>
<content type='text'>
FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70728

X-original-commit: 85c24961ab9ff5c1c79eb7415c97c46d9a77cca3
Related: odoo/enterprise#18283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70728

X-original-commit: 85c24961ab9ff5c1c79eb7415c97c46d9a77cca3
Related: odoo/enterprise#18283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: properly handle API keys on inactive users</title>
<updated>2021-02-18T10:33:28+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2021-01-14T10:08:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=baebf5814425cce6a9481b4efec5248bbba3ea64'/>
<id>baebf5814425cce6a9481b4efec5248bbba3ea64</id>
<content type='text'>
closes odoo/odoo#66439

Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#66439

Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: accounting groups field dropped from users' form view</title>
<updated>2020-12-16T11:19:58+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-12-15T15:08:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=399b4f1ceb31f560ce534ee8d9605ca43733f68c'/>
<id>399b4f1ceb31f560ce534ee8d9605ca43733f68c</id>
<content type='text'>
To reproduce this issue, install the module "Accounting" in English,
then switch language to Dutch, and go to a user's form.  The selection
field for accounting groups is missing from the users' form view.

The source of the bug is the special case introduced for accounting
groups in d8c5cc1335806d379134866262840fcafb05b643.  The groups in that
selection field are not totally ordered, and the non-ordered elements
are de facto ordered by name, which is a translated field!  In the
example above, the English version uses the field name
`sel_groups_22_23_24_25` while the Dutch version uses the field name
`sel_groups_23_22_24_25`.  Because the first one is used in the form
view, and it is not found in the model's documented fields (which uses
the second one), the field is discarded from the view.

The patch modifies the override of method `fields_get()` to consider all
the possible names for that selection field, and returns them all.

OPW-2394209

closes odoo/odoo#63423

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To reproduce this issue, install the module "Accounting" in English,
then switch language to Dutch, and go to a user's form.  The selection
field for accounting groups is missing from the users' form view.

The source of the bug is the special case introduced for accounting
groups in d8c5cc1335806d379134866262840fcafb05b643.  The groups in that
selection field are not totally ordered, and the non-ordered elements
are de facto ordered by name, which is a translated field!  In the
example above, the English version uses the field name
`sel_groups_22_23_24_25` while the Dutch version uses the field name
`sel_groups_23_22_24_25`.  Because the first one is used in the form
view, and it is not found in the model's documented fields (which uses
the second one), the field is discarded from the view.

The patch modifies the override of method `fields_get()` to consider all
the possible names for that selection field, and returns them all.

OPW-2394209

closes odoo/odoo#63423

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: relax api keys env check</title>
<updated>2020-12-01T09:17:50+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2020-12-01T09:17:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ee2625a9311f308b9df3fc160dc5c9fe4cc5a497'/>
<id>ee2625a9311f308b9df3fc160dc5c9fe4cc5a497</id>
<content type='text'>
Before this change, the apikeys' ``_check_credentials`` override would
hard-check the ``'interactive'`` key. This turns out to be less than
ideal for compatibility with older code which might not properly
forward the environment (or might call ``_check_credentials`` from a
non-override and pass in an empty env) as it straight crashes.

Update the override to assume an interactive login if the information
is missing (as that seems like the more secure option: it ignores
apikeys and takes 2FA in account if enabled). Also trigger a warning
if the key was missing from the environment, such that the maintainer
hopefully takes a look at the issue.

Also allow a ``user_agent_env`` of ``None``, this will also trigger
the warning so seems OK.

closes odoo/odoo#62664

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, the apikeys' ``_check_credentials`` override would
hard-check the ``'interactive'`` key. This turns out to be less than
ideal for compatibility with older code which might not properly
forward the environment (or might call ``_check_credentials`` from a
non-override and pass in an empty env) as it straight crashes.

Update the override to assume an interactive login if the information
is missing (as that seems like the more secure option: it ignores
apikeys and takes 2FA in account if enabled). Also trigger a warning
if the key was missing from the environment, such that the maintainer
hopefully takes a look at the issue.

Also allow a ``user_agent_env`` of ``None``, this will also trigger
the warning so seems OK.

closes odoo/odoo#62664

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: update document links</title>
<updated>2020-10-19T05:24:27+00:00</updated>
<author>
<name>Swapnesh Shah</name>
<email>swapneshshah111@gmail.com</email>
</author>
<published>2020-10-15T18:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7ac08486d91d0ff0151abeeda057ffa6beda72e8'/>
<id>7ac08486d91d0ff0151abeeda057ffa6beda72e8</id>
<content type='text'>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-&gt; /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#59554

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-&gt; /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#59554

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: avoid creating a new index at each model initialization</title>
<updated>2020-09-28T16:37:43+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2020-09-28T16:37:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=94068037fbddc816926af7c68c19780926832722'/>
<id>94068037fbddc816926af7c68c19780926832722</id>
<content type='text'>
As example, on a runbot database, there are 13 duplicated indexes

```
4362411-14-0-all=&gt; \d res_users_apikeys;
                                         Table "public.res_users_apikeys"
   Column    |            Type             | Collation | Nullable |                    Default
-------------+-----------------------------+-----------+----------+-----------------------------------------------
 id          | integer                     |           | not null | nextval('res_users_apikeys_id_seq'::regclass)
 name        | character varying           |           | not null |
 user_id     | integer                     |           | not null |
 scope       | character varying           |           |          |
 index       | character varying(8)        |           |          |
 key         | character varying           |           |          |
 create_date | timestamp without time zone |           |          | timezone('utc'::text, now())
Indexes:
    "res_users_apikeys_pkey" PRIMARY KEY, btree (id)
    "res_users_apikeys_user_id_index_idx" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx1" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx10" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx11" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx12" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx2" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx3" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx4" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx5" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx6" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx7" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx8" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx9" btree (user_id, index)
Check constraints:
    "res_users_apikeys_index_check" CHECK (char_length(index::text) = 8)
Foreign-key constraints:
    "res_users_apikeys_user_id_fkey" FOREIGN KEY (user_id) REFERENCES res_users(id)
```

closes odoo/odoo#58726

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As example, on a runbot database, there are 13 duplicated indexes

```
4362411-14-0-all=&gt; \d res_users_apikeys;
                                         Table "public.res_users_apikeys"
   Column    |            Type             | Collation | Nullable |                    Default
-------------+-----------------------------+-----------+----------+-----------------------------------------------
 id          | integer                     |           | not null | nextval('res_users_apikeys_id_seq'::regclass)
 name        | character varying           |           | not null |
 user_id     | integer                     |           | not null |
 scope       | character varying           |           |          |
 index       | character varying(8)        |           |          |
 key         | character varying           |           |          |
 create_date | timestamp without time zone |           |          | timezone('utc'::text, now())
Indexes:
    "res_users_apikeys_pkey" PRIMARY KEY, btree (id)
    "res_users_apikeys_user_id_index_idx" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx1" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx10" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx11" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx12" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx2" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx3" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx4" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx5" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx6" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx7" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx8" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx9" btree (user_id, index)
Check constraints:
    "res_users_apikeys_index_check" CHECK (char_length(index::text) = 8)
Foreign-key constraints:
    "res_users_apikeys_user_id_fkey" FOREIGN KEY (user_id) REFERENCES res_users(id)
```

closes odoo/odoo#58726

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: virtual group fields on users with new default/onchange</title>
<updated>2020-09-18T08:26:28+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2020-09-18T06:41:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f8658f229180a595d69cd6daefeded082c7f64ea'/>
<id>f8658f229180a595d69cd6daefeded082c7f64ea</id>
<content type='text'>
* override `onchange` in res.users in order to properly generate and
  send the reified group fields alongside the rest: while default_get
  sets them up, those fields then get stripped by the onchange
  machinery as they don't actually exist on the model
* add a test to check for it
* fix SSF in relation with the new default/onchange system
  - because fields may not actually exist on the record,
    `record_to_values` needs to `read` the record data rather than
    directly access the recordset: the recordset likely will not
    know about fake fields
  - after the initial onchange has run the form must be filled with
    falsy values in case the onchange has not sent defaults for
    everything
  - on creation, all fields in the form should be considered modified

Task 2341153

closes odoo/odoo#57987

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* override `onchange` in res.users in order to properly generate and
  send the reified group fields alongside the rest: while default_get
  sets them up, those fields then get stripped by the onchange
  machinery as they don't actually exist on the model
* add a test to check for it
* fix SSF in relation with the new default/onchange system
  - because fields may not actually exist on the record,
    `record_to_values` needs to `read` the record data rather than
    directly access the recordset: the recordset likely will not
    know about fake fields
  - after the initial onchange has run the form must be filled with
    falsy values in case the onchange has not sent defaults for
    everything
  - on creation, all fields in the form should be considered modified

Task 2341153

closes odoo/odoo#57987

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] core: _name_search() now returns a list of ids</title>
<updated>2020-08-18T13:02:41+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-06-17T12:18:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1f48130d2bd055835ee428a21922331d126285a3'/>
<id>1f48130d2bd055835ee428a21922331d126285a3</id>
<content type='text'>
This provides a better API to search for records by name without the
formatting part (`display_name`).

This also simplifies all the overridings of `_name_search` that no
longer need to call `name_get()`.  The call to `name_get()` is done in
method `name_search` in a generic way.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provides a better API to search for records by name without the
formatting part (`display_name`).

This also simplifies all the overridings of `_name_search` that no
longer need to call `name_get()`.  The call to `name_get()` is done in
method `name_search` in a generic way.</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core: clarify making fields inaccessible</title>
<updated>2020-08-17T09:30:53+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2020-08-17T07:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bfa00919cd893694c55d5fa9680c3dbbd1f66d3e'/>
<id>bfa00919cd893694c55d5fa9680c3dbbd1f66d3e</id>
<content type='text'>
* add a constant to `fields` for that purpose
* add a test to ensure that it works as expected
* fix the formatter so it handles the pattern correctly</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* add a constant to `fields` for that purpose
* add a test to ensure that it works as expected
* fix the formatter so it handles the pattern correctly</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] core, web: support for partial sessions &amp; MFA</title>
<updated>2020-08-14T23:06:24+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-06-05T09:06:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=096972de0be5af2bbdf5003904bd31b79f8f4ce1'/>
<id>096972de0be5af2bbdf5003904bd31b79f8f4ce1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
