<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/tests/mockserver_tests.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: mock active_test for search and search_read</title>
<updated>2021-02-15T15:32:48+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2021-02-15T14:02:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0ad1c1631eb233b3e8f98b40f8c0813d0ad7acbe'/>
<id>0ad1c1631eb233b3e8f98b40f8c0813d0ad7acbe</id>
<content type='text'>
The support for "active_test" context key has been introduced in c2918c1
However, the context key is ignored in many mocked ORM methods (if not all).

This commit adds support for the `search` and `search_read` methods.

Note: this is done to easily write some tests in odoo/enterprise#16363
and it might be usefull to test futures features (or fixes) using this
context key.

closes odoo/odoo#66190

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The support for "active_test" context key has been introduced in c2918c1
However, the context key is ignored in many mocked ORM methods (if not all).

This commit adds support for the `search` and `search_read` methods.

Note: this is done to easily write some tests in odoo/enterprise#16363
and it might be usefull to test futures features (or fixes) using this
context key.

closes odoo/odoo#66190

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: mock all name_get behaviors</title>
<updated>2020-11-25T15:55:16+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2020-11-25T15:49:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c8f59bfd5c8ddb7c7abf1108111507e667393208'/>
<id>c8f59bfd5c8ddb7c7abf1108111507e667393208</id>
<content type='text'>
The mock implementation of `name_get` does not fully reflect
the real server implementation.

The real implementation is described in tests added in
this commit.

Note: in my wildest dreams, the mock server tests would be run
against the real *and* the mock implementation to ensure they
do not diverge.

closes odoo/odoo#62347

Related: odoo/enterprise#14990
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mock implementation of `name_get` does not fully reflect
the real server implementation.

The real implementation is described in tests added in
this commit.

Note: in my wildest dreams, the mock server tests would be run
against the real *and* the mock implementation to ensure they
do not diverge.

closes odoo/odoo#62347

Related: odoo/enterprise#14990
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web, base: MockServer should have the same behavior as the server</title>
<updated>2019-08-30T09:09:48+00:00</updated>
<author>
<name>Pierre Paridans</name>
<email>app@odoo.com</email>
</author>
<published>2019-08-29T15:10:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=81d0f394801a9e47429de1412fd8b4971ffdea81'/>
<id>81d0f394801a9e47429de1412fd8b4971ffdea81</id>
<content type='text'>
An RPC call using an empty array of fields has not the same behavior on
the MockServer and the actual server:

- the MockServer returns only the 'id' field
- the actual server returns all the fields for the model

This is due to the fact that an empty array evaluates to a falsy value
in Python and evaluates to a thruthy value in JavaScript.

This commit restores the parity between the two.

closes odoo/odoo#36278

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An RPC call using an empty array of fields has not the same behavior on
the MockServer and the actual server:

- the MockServer returns only the 'id' field
- the actual server returns all the fields for the model

This is due to the fact that an empty array evaluates to a falsy value
in Python and evaluates to a thruthy value in JavaScript.

This commit restores the parity between the two.

closes odoo/odoo#36278

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</pre>
</div>
</content>
</entry>
</feed>
