<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/models/ir_model.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] various: improve code style and performance by improve ``all()`` usage</title>
<updated>2020-08-31T11:45:43+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-08-18T12:26:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1cc6bb1231401ea7f501d2f5b5e9641ec8734850'/>
<id>1cc6bb1231401ea7f501d2f5b5e9641ec8734850</id>
<content type='text'>
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --&gt; any(not) for earlier returns;
  * all([generator]) --&gt; all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56060

Related: odoo/enterprise#12486
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --&gt; any(not) for earlier returns;
  * all([generator]) --&gt; all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56060

Related: odoo/enterprise#12486
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] fields: add validation of parameter names</title>
<updated>2020-04-07T09:25:08+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-02-14T14:37:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1b1b2142f163e323e2d73bec6b380272a9c42998'/>
<id>1b1b2142f163e323e2d73bec6b380272a9c42998</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] models: ORM speedup</title>
<updated>2019-08-20T12:43:59+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-08-14T07:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9920f20e4c7753bc17bea71dea3a90f7de687196'/>
<id>9920f20e4c7753bc17bea71dea3a90f7de687196</id>
<content type='text'>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: remove usage of `oldname` attribute</title>
<updated>2019-08-05T09:36:41+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-08-05T09:07:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=886eca0131716e137e60a1e398a9fc3996dfa425'/>
<id>886eca0131716e137e60a1e398a9fc3996dfa425</id>
<content type='text'>
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] *: calls to @api.multi</title>
<updated>2019-07-17T12:13:12+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2019-07-10T12:59:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b38cc6590abcb58a0ca102a06063eb3db7ac1f4'/>
<id>4b38cc6590abcb58a0ca102a06063eb3db7ac1f4</id>
<content type='text'>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail: make blacklist a mixin built upon mail.thread and add message_bounce</title>
<updated>2019-05-13T15:18:40+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-04-18T13:25:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=dbd4aab6c3172688d98cef700265795527d63cb3'/>
<id>dbd4aab6c3172688d98cef700265795527d63cb3</id>
<content type='text'>
  * mail.blacklist.mixin now clearly make inheritance on mail.thread. Indeed
    we consider models using the blacklist mechanism as being used in mailing
    features, meaning they will anyway inherit form mail.thread. In standard
    Odoo it is the case for the 3 models using it (Lead/Opportunity, Contact
    and Mailing Contact);
  * define message_bounce directly in mail.blacklist.mixin. Bounce counter
    is indeed linked to the blacklist and mailing mechanism;
  * rename mail.blacklist.mixin to mail.thread.blacklist to ensure coherency
    with mail.thread and mail.thread.cc (another mixin build on mailL.thread);

Inherit declarations in various addons are updated accordingly.

Related to task ID 1911679
Linked to PR #29483</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  * mail.blacklist.mixin now clearly make inheritance on mail.thread. Indeed
    we consider models using the blacklist mechanism as being used in mailing
    features, meaning they will anyway inherit form mail.thread. In standard
    Odoo it is the case for the 3 models using it (Lead/Opportunity, Contact
    and Mailing Contact);
  * define message_bounce directly in mail.blacklist.mixin. Bounce counter
    is indeed linked to the blacklist and mailing mechanism;
  * rename mail.blacklist.mixin to mail.thread.blacklist to ensure coherency
    with mail.thread and mail.thread.cc (another mixin build on mailL.thread);

Inherit declarations in various addons are updated accordingly.

Related to task ID 1911679
Linked to PR #29483</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: reflect blacklist inheritance on model</title>
<updated>2019-05-13T15:18:40+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-01-04T10:23:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0f141607b8214887d0eff4c561a2b17399a43613'/>
<id>0f141607b8214887d0eff4c561a2b17399a43613</id>
<content type='text'>
Like already done for some mail mixins

  * mail.thread reflected on ir.model: see 1119fdd8a3c7fb0a18b348c4724d71eebf53a28e;
  * mail.activity.mixin reflected on ir.model: see f48021846a2b54d84d4317b40fa7128f76c28d10;

We allow to reflect the mail.blacklist.mixin on ir.model in this commit. This
inheritance imply the mail.address.mixin to allow normalization of emails on
models using the blacklist mixin.

It is useful notably to clearly store this inheritance and also allow
future tweaking through studio to enable more advanced mail capabilities
to custom models. Blacklist is useful when dealing with mass mailing and
marketing automation.

It will also be used in mailgateway to find all blacklist-related models
in Odoo and update the blacklist accordingly to the bounce and error
management in the mailgateway. Those improvements will come soon.

Related to task ID 1911679
Linked to PR #29483</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like already done for some mail mixins

  * mail.thread reflected on ir.model: see 1119fdd8a3c7fb0a18b348c4724d71eebf53a28e;
  * mail.activity.mixin reflected on ir.model: see f48021846a2b54d84d4317b40fa7128f76c28d10;

We allow to reflect the mail.blacklist.mixin on ir.model in this commit. This
inheritance imply the mail.address.mixin to allow normalization of emails on
models using the blacklist mixin.

It is useful notably to clearly store this inheritance and also allow
future tweaking through studio to enable more advanced mail capabilities
to custom models. Blacklist is useful when dealing with mass mailing and
marketing automation.

It will also be used in mailgateway to find all blacklist-related models
in Odoo and update the blacklist accordingly to the bounce and error
management in the mailgateway. Those improvements will come soon.

Related to task ID 1911679
Linked to PR #29483</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-12.3 up to 60e71302a38</title>
<updated>2019-05-13T13:26:12+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-05-13T13:26:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8dd5a85267b522ba569ab9ed44901f95fffbeb4f'/>
<id>8dd5a85267b522ba569ab9ed44901f95fffbeb4f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-12.1 up to b11930047f6</title>
<updated>2019-05-02T07:45:14+00:00</updated>
<author>
<name>Denis Ledoux</name>
<email>dle@odoo.com</email>
</author>
<published>2019-05-02T07:42:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fd0a10026c06315b4fbe520a7a3604a6b395f54a'/>
<id>fd0a10026c06315b4fbe520a7a3604a6b395f54a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch 12.0 up to 2830b93a3a7</title>
<updated>2019-04-17T17:47:37+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-04-17T17:47:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=15b8d353c7bcee7279a06a1dc4d03e8c259cc2f2'/>
<id>15b8d353c7bcee7279a06a1dc4d03e8c259cc2f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
