<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/website/tests/test_performance.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] core: non-stored binary fields should have attachment=False</title>
<updated>2020-09-17T15:11:18+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-09-16T14:09:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7325c3f8c538a8b8c0435963cdda3ced6fe4b324'/>
<id>7325c3f8c538a8b8c0435963cdda3ced6fe4b324</id>
<content type='text'>
This prevents some code (in controllers) to retrieve an attachment for a
field that is not stored, as the code only relies on `field.attachment`.
This also makes the field definition more consistent.

closes odoo/odoo#57969

X-original-commit: 13397943d9e953815ae5ce9b01ce812a92903361
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 prevents some code (in controllers) to retrieve an attachment for a
field that is not stored, as the code only relies on `field.attachment`.
This also makes the field definition more consistent.

closes odoo/odoo#57969

X-original-commit: 13397943d9e953815ae5ce9b01ce812a92903361
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base,website*: do not store country flags.</title>
<updated>2020-09-03T08:40:37+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-09-02T08:57:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=710705b64c0134a5b568d998d0a3eb0df0f541c0'/>
<id>710705b64c0134a5b568d998d0a3eb0df0f541c0</id>
<content type='text'>
1) Avoid the storage of all country flags as ir_attachment (230+
ir_attachment in a new db) to reduce the filestore of databases.

The country flags are nearly static and not expected to be modified on
Odoo instances.

This change is based on the new "image_url" widget logic (see previous commits).

2) Extend the flag coverage for countries

Add the missing country flags &amp; specify a mapping to provide flags
for overseas administrated countries/territories.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Avoid the storage of all country flags as ir_attachment (230+
ir_attachment in a new db) to reduce the filestore of databases.

The country flags are nearly static and not expected to be modified on
Odoo instances.

This change is based on the new "image_url" widget logic (see previous commits).

2) Extend the flag coverage for countries

Add the missing country flags &amp; specify a mapping to provide flags
for overseas administrated countries/territories.</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website: perf - cache public page</title>
<updated>2020-08-21T17:50:00+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-08-20T12:30:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cbf8d3b3047c94a2ff7fb197bbae92a402e0b58b'/>
<id>cbf8d3b3047c94a2ff7fb197bbae92a402e0b58b</id>
<content type='text'>
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website: adapt query count</title>
<updated>2020-07-24T08:30:00+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-06-10T08:13:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e1f514f100dc70c1a4b324e8e1df16b7009eb9de'/>
<id>e1f514f100dc70c1a4b324e8e1df16b7009eb9de</id>
<content type='text'>
closes odoo/odoo#54878

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#54878

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website, website_blog: adapt tests</title>
<updated>2020-06-11T15:26:29+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-06-10T07:30:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a6c43e0366473f9e920a35d95f1703ba58a20fef'/>
<id>a6c43e0366473f9e920a35d95f1703ba58a20fef</id>
<content type='text'>
closes odoo/odoo#52865

X-original-commit: ae268ec99e25d246593b3996981b4287a0ed3081
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#52865

X-original-commit: ae268ec99e25d246593b3996981b4287a0ed3081
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website: improvement regarding social image</title>
<updated>2020-03-30T16:06:13+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2020-03-17T17:18:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=30f4f610bf146638b71a0b2a936f8ae9acef502e'/>
<id>30f4f610bf146638b71a0b2a936f8ae9acef502e</id>
<content type='text'>
This commit introduce multiple improvements regarding social image:
  - (perf) Don't read ir.attachment through `social_default_image` when it is
    not needed. Use a stored boolean to know if the field should be accessed.
    This will remove one SQL query in attachment for public user.
  - Show website logo, not the company logo since we now have a different logo
    for website.
  - Don't show images lower than 200 width or 200 height px. Logo will be
    shown regardless of his size.
  - Don't show website logo if there is a website social_default_image.
    Indeed, the spec was to prevent showing logo and social_default_image if
    they are the same image. Technically, this is hard to identify as they
    could be the same image uploaded with different resolutions (media dialog),
    especially if one of those was uploaded through the backend and one from
    the frontend.
    It is most likely we will never correctly identify duplicate as they won't
    be exactly the same.
    For this reason, it makes more sense to hide the website logo if the
    social_default_image is set. It avoids every issues while it makes sense
    since you won't want to use the logo over the social_default_image. If you
    really want to, you could reupload it through the SEO media dialog.

closes odoo/odoo#47848

Related: odoo/upgrade#1012
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;
Co-authored-by: Jeremy Kersten &lt;jke@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit introduce multiple improvements regarding social image:
  - (perf) Don't read ir.attachment through `social_default_image` when it is
    not needed. Use a stored boolean to know if the field should be accessed.
    This will remove one SQL query in attachment for public user.
  - Show website logo, not the company logo since we now have a different logo
    for website.
  - Don't show images lower than 200 width or 200 height px. Logo will be
    shown regardless of his size.
  - Don't show website logo if there is a website social_default_image.
    Indeed, the spec was to prevent showing logo and social_default_image if
    they are the same image. Technically, this is hard to identify as they
    could be the same image uploaded with different resolutions (media dialog),
    especially if one of those was uploaded through the backend and one from
    the frontend.
    It is most likely we will never correctly identify duplicate as they won't
    be exactly the same.
    For this reason, it makes more sense to hide the website logo if the
    social_default_image is set. It avoids every issues while it makes sense
    since you won't want to use the logo over the social_default_image. If you
    really want to, you could reupload it through the SEO media dialog.

closes odoo/odoo#47848

Related: odoo/upgrade#1012
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;
Co-authored-by: Jeremy Kersten &lt;jke@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] http_routing: use cached code from lang</title>
<updated>2020-03-26T18:12:47+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-03-26T18:07:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=26c4de2f18be2b4e944ee255236d9a5a1710d94c'/>
<id>26c4de2f18be2b4e944ee255236d9a5a1710d94c</id>
<content type='text'>
In case of short controller that don't use qweb template, we don't need
anyhting else that this url code that don't change frequently.

It make only sense for model like lang, website, ... that will not change
frequently. And are called on each call by the dispatcher.

In case of a website page, we will btw browse lang later, but in case of
small controller like /favicon.ico, or page without qweb, ... we can just
use the same from last query.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of short controller that don't use qweb template, we don't need
anyhting else that this url code that don't change frequently.

It make only sense for model like lang, website, ... that will not change
frequently. And are called on each call by the dispatcher.

In case of a website page, we will btw browse lang later, but in case of
small controller like /favicon.ico, or page without qweb, ... we can just
use the same from last query.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: perf - binary_record, don't rebrowse ir.attachment</title>
<updated>2020-03-26T18:12:47+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-03-26T18:06:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1606d22d40cd431a02e73bb0661a192bb12edf85'/>
<id>1606d22d40cd431a02e73bb0661a192bb12edf85</id>
<content type='text'>
If model is already an ir.attachment we don't need to do a new search_read.
We can use it record directly.

After this commit, we don't do extra request if we already have the info,
else we don't change the behavior.

task-2211013</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If model is already an ir.attachment we don't need to do a new search_read.
We can use it record directly.

After this commit, we don't do extra request if we already have the info,
else we don't change the behavior.

task-2211013</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website: perf - add cache for website frequent fields</title>
<updated>2020-03-26T18:12:50+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-03-26T18:06:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6d6b505598413b0d766a8394c7131351ade64266'/>
<id>6d6b505598413b0d766a8394c7131351ade64266</id>
<content type='text'>
The dispatching layer of Odoo (common to any call) can avoid a query on website
if those 3 values are cached.
Note that for complex business flows, there won't be any gain since website
infos will have to be fetched at some point.

About user_id:
In most cases, for a website page you will need to browse the website btw so
we don't remove this request previously. But in case of a simple image, the
controller /web/content need the public user just to set the request.uid in
auth_public but no other info from website.

With this commit, we don't do the 'select * from website where id in()'
request on each controller declared in auth='public' but use the user_id
from the cache. (Invalidated by the write on website_id)

task-2211013

Co-authored-by: Jérémy Kersten &lt;jke@odoo.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dispatching layer of Odoo (common to any call) can avoid a query on website
if those 3 values are cached.
Note that for complex business flows, there won't be any gain since website
infos will have to be fetched at some point.

About user_id:
In most cases, for a website page you will need to browse the website btw so
we don't remove this request previously. But in case of a simple image, the
controller /web/content need the public user just to set the request.uid in
auth_public but no other info from website.

With this commit, we don't do the 'select * from website where id in()'
request on each controller declared in auth='public' but use the user_id
from the cache. (Invalidated by the write on website_id)

task-2211013

Co-authored-by: Jérémy Kersten &lt;jke@odoo.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: perf - try/except instead of exists</title>
<updated>2020-03-26T18:12:47+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2020-03-26T18:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bd4a44cece6cc51d7358ec3861633bb53db53005'/>
<id>bd4a44cece6cc51d7358ec3861633bb53db53005</id>
<content type='text'>
Most of the time, the record exists, but we still ensure it does, every single
time, making an SQL query.
Doing a try catch will result in the same behavior, but won't make that query
most of the time.

task-2211013</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the time, the record exists, but we still ensure it does, every single
time, making an SQL query.
Doing a try catch will result in the same behavior, but won't make that query
most of the time.

task-2211013</pre>
</div>
</content>
</entry>
</feed>
