<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/addons/test_new_api/models.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>[IMP] base/test_*: Adapt tests to work with/without demo data</title>
<updated>2019-11-05T12:08:02+00:00</updated>
<author>
<name>Yannick Tivisse</name>
<email>yti@odoo.com</email>
</author>
<published>2019-11-04T15:22:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4aa5ba35afa949098d532189beb4c680dcada2fa'/>
<id>4aa5ba35afa949098d532189beb4c680dcada2fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] fields: 'bin_size' must have no effect on arbitrary binary field values</title>
<updated>2019-10-22T12:25:52+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-10-22T08:48:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6973dfbaefb7ef2c2c8809bcca0b56565e868124'/>
<id>6973dfbaefb7ef2c2c8809bcca0b56565e868124</id>
<content type='text'>
This fixes a regression introduced by 291a0e99d137142bd24addd1054c1357ddd7125a.

closes odoo/odoo#39178

X-original-commit: 852ee32e3419c210a3844b0f943af8dd2bbdae88
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a regression introduced by 291a0e99d137142bd24addd1054c1357ddd7125a.

closes odoo/odoo#39178

X-original-commit: 852ee32e3419c210a3844b0f943af8dd2bbdae88
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] models: filtered_domain on date/datetime fields</title>
<updated>2019-10-21T09:08:47+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-10-14T09:37:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bb9952cff275cade0814b906d9d166eaf1387e60'/>
<id>bb9952cff275cade0814b906d9d166eaf1387e60</id>
<content type='text'>
X-original-commit: 5399c139b884f721b92477533eae1e03bf4cf62b</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
X-original-commit: 5399c139b884f721b92477533eae1e03bf4cf62b</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] fields: ensure Binary are never recomputed with "bin_size"</title>
<updated>2019-10-21T09:08:10+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-10-15T14:07:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=883fd9e045350512c437fe8e518f08e3b880b511'/>
<id>883fd9e045350512c437fe8e518f08e3b880b511</id>
<content type='text'>
The compute methods are always expecting the real value and not the bin_size.

The solution is to always compute with `bin_size=False`, and then manually
compute the `bin_size` and set it on the cache of `bin_size=True`.

PR: #38292

Co-authored-by Sébastien Theys &lt;seb@odoo.com&gt;

X-original-commit: 7744886d6141ca7971d91807d0444c707e10fdf8</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compute methods are always expecting the real value and not the bin_size.

The solution is to always compute with `bin_size=False`, and then manually
compute the `bin_size` and set it on the cache of `bin_size=True`.

PR: #38292

Co-authored-by Sébastien Theys &lt;seb@odoo.com&gt;

X-original-commit: 7744886d6141ca7971d91807d0444c707e10fdf8</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: don't crash during CRUD if record does not exist</title>
<updated>2019-10-15T14:33:07+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2019-10-11T07:19:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=73b18b30b5fcad43a08407d4cfa13b6c55c58f4c'/>
<id>73b18b30b5fcad43a08407d4cfa13b6c55c58f4c</id>
<content type='text'>
- Let a model M define a Many2oneReference field F1.
- Let a model N define a One2many field F2 whose inverse is M-&gt;F1
- Define a computed field N-&gt;F3 that depends on N-&gt;F2

If, for whatever reason, a recordset of M contains records that have
been unlinked already and we try to unlink them again, the system will
crash with a MissingException error.

This happened because, while most _modified_trigger cases cover the case
of a MissingException (i.e. record not in cache), the case for a
Many2oneReference didn't.

This is fixed by simply ignoring these "stale" records in the
_modified_triggers section for Many2oneReference fields.

closes odoo/odoo#38816

X-original-commit: f3b05032f0576befda4dca870718afd429c21b0f
Signed-off-by: Adrian Torres (adt) &lt;adt@odoo.com&gt;
Co-authored-by: mreficent &lt;miquel.raich@eficent.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Let a model M define a Many2oneReference field F1.
- Let a model N define a One2many field F2 whose inverse is M-&gt;F1
- Define a computed field N-&gt;F3 that depends on N-&gt;F2

If, for whatever reason, a recordset of M contains records that have
been unlinked already and we try to unlink them again, the system will
crash with a MissingException error.

This happened because, while most _modified_trigger cases cover the case
of a MissingException (i.e. record not in cache), the case for a
Many2oneReference didn't.

This is fixed by simply ignoring these "stale" records in the
_modified_triggers section for Many2oneReference fields.

closes odoo/odoo#38816

X-original-commit: f3b05032f0576befda4dca870718afd429c21b0f
Signed-off-by: Adrian Torres (adt) &lt;adt@odoo.com&gt;
Co-authored-by: mreficent &lt;miquel.raich@eficent.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] models: consider all inactive records in modified()</title>
<updated>2019-10-03T09:44:48+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-10-02T07:18:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=dc55294953ef06bd7898419210719263719727fc'/>
<id>dc55294953ef06bd7898419210719263719727fc</id>
<content type='text'>
closes odoo/odoo#37863

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

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] models, fields: cache consistency for one2many fields</title>
<updated>2019-09-30T15:42:36+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-09-23T13:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b1cb41cf7a3f936a1e6d00a2bb6a6a29e82d711'/>
<id>4b1cb41cf7a3f936a1e6d00a2bb6a6a29e82d711</id>
<content type='text'>
Issue: after many2one updates, the cache of the corresponding one2many
fields was inconsistent when the latter depends on `active_test`.  One
of the values in cache was updated, while the other was left intact.

We simplify the cache by not making the field depend on context: the
cache value contains all the records in the relation (corresponding to
`active_test=False`).  The value of the field is automatically filtered
by the `active` field when the value is accessed.

This makes it easier to maintain the cache value, guarantees its
consistency, and avoids queries to read the one2many field with
`active_test=False`, after having set it with `active_test=True`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue: after many2one updates, the cache of the corresponding one2many
fields was inconsistent when the latter depends on `active_test`.  One
of the values in cache was updated, while the other was left intact.

We simplify the cache by not making the field depend on context: the
cache value contains all the records in the relation (corresponding to
`active_test=False`).  The value of the field is automatically filtered
by the `active` field when the value is accessed.

This makes it easier to maintain the cache value, guarantees its
consistency, and avoids queries to read the one2many field with
`active_test=False`, after having set it with `active_test=True`.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: add missing model description</title>
<updated>2019-09-24T07:33:09+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2019-09-23T12:59:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=35a9150d79d7a4d45cff01a3af42e775fe5a5b8f'/>
<id>35a9150d79d7a4d45cff01a3af42e775fe5a5b8f</id>
<content type='text'>
Some models did not specified a _description</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some models did not specified a _description</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] fields: default to ondelete='cascade' for required m2o fields on transient</title>
<updated>2019-09-20T12:23:09+00:00</updated>
<author>
<name>Xavier ALT</name>
<email>xal@odoo.com</email>
</author>
<published>2019-09-11T21:15:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c5fa4771fcec91c06a26d5103126a1373f962f0b'/>
<id>c5fa4771fcec91c06a26d5103126a1373f962f0b</id>
<content type='text'>
TransientModel (wizards) can be annoying because if they have required
many2one fields, those fields will default to `ondelete='restrict'`,
preventing user to delete the comodel records without deleting the
transient model records first.

To improve such case, we default to `ondelete='cascade'` for required
many2one field on a TransientModel (unless specified otherwise)

closes odoo/odoo#36738

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TransientModel (wizards) can be annoying because if they have required
many2one fields, those fields will default to `ondelete='restrict'`,
preventing user to delete the comodel records without deleting the
transient model records first.

To improve such case, we default to `ondelete='cascade'` for required
many2one field on a TransientModel (unless specified otherwise)

closes odoo/odoo#36738

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] fields: clash with automatic fields and inheritance</title>
<updated>2019-09-10T13:29:15+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-09-04T11:19:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1315a1a82c0f09f4f97a04b26bedb590ceb8ecbb'/>
<id>1315a1a82c0f09f4f97a04b26bedb590ceb8ecbb</id>
<content type='text'>
Consider a model M that defines `display_name` as a computed stored
field, then an extension of M that introduces a mixin model A before
that definition in the MRO of M's class.  The model A is expected to
have an automatic, non stored field `display_name`, while M must have
its non-automatic, stored field `display_name`.

closes odoo/odoo#36427

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider a model M that defines `display_name` as a computed stored
field, then an extension of M that introduces a mixin model A before
that definition in the MRO of M's class.  The model A is expected to
have an automatic, non stored field `display_name`, while M must have
its non-automatic, stored field `display_name`.

closes odoo/odoo#36427

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
