Disabled livechat in blog query count
if website_livechat is installed before website_blog, the get_livechat_channel_info add
unrelated query for the current test. So we disabled it.
Courstesy of @Xavier-Do for analyse
closesodoo/odoo#58044
X-original-commit: 86f065e3571a1339798501156804fda6c57c6989
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Related to digest update in 13.4 (a595ebfca5ab7041224c661f404138612257bdda).
QUERY COUNT IN BLOG
Local installation of blog still makes those tests use 27 or 28 queries. On
runbot it grows until 32.
Due to dependency change, installation order changes. It may have an effect on
query count in website loading some pages in blog. This is worth checking why
queries are added.
Digest module itself has nothing to do with website. It could either be a side
effect of some computed field, either an installation order change adding more
modules before installing blog, with side-effect of adding queries due to
another module.
As without this fix installing website is not possible, let us merge this one
and investigate further soon.
closesodoo/odoo#55835
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Seems like randomly one request disappear. So 28 vs 29
Closes the eyes, while it is not 30 vs 29 ;)
closesodoo/odoo#50667
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Http routing and websits module will already do it later and handle the case.
The only ModelConverter used that will be impacted is:
/web_editor/attachment/<model("ir.attachment"):attachment>
that is a json controller called with eisting data
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
We use `author_id` (res.partner record) to instanciate our frontend widget
address so it can be changed through left panel in a searchable list.
This require a read on res.partner to get his name, even for visitors.
Using a related will have the same result for visitors while it won't need to
query res.partner table.
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Without this commit, if `lang_code` or `env.context.get('lang')` was set, we
would still access `env.user.company_id.partner_id.lang` to fill the loop array
even if we break and don't need that value.
Switching from loop to if conditions prevents that.
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Without this commit, a simple search like:
`env['blog.tag'].search([('website_id', 'in', (1, False))])`
would generate 4 SQL queries instead of 1.
3 requests would be done on `blog.blog`, see `right_ids` at ORM level.
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
`tags_list()` is called in loops to get nicely formatted URL in blog tag button
but doing an exists here will do everytime an SQL query regardless of the
cache.
We can safely remove the call to `exists()` as the `tag_ids` parameter is
coming from the controller `active_tag_ids` key which is already ensuring the
exists condition.
It make also the number of requests determinists for test with a random number
of tags. From between 200 ~ 300 queries (depending number of tags)-> 116
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Most of the website rendering process depends of customize_show views which are
part of a configuration setup.
Once it has been setup, it will most likely never change afterward.
It makes sense to orm cache those infos to avoid having to query ir.ui.view
table everytime we render something.
Note that just store basic and small infos used for customize_show case.
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>