[IMP] *: avoid useless bundle generations

Some bundle are exactly the same as other one, we can avoid generating
them by using the original one.

Part-of: odoo/odoo#99176
This commit is contained in:
Xavier-Do
2022-09-12 13:48:59 +02:00
parent ae3e68c1f4
commit 93a9eb0a32
4 changed files with 7 additions and 4 deletions
@@ -74,7 +74,7 @@
</script>
<base target="_parent"/>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="mrp_subcontracting.webclient" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="mrp_subcontracting.webclient" t-css="false"/>
<t t-call="web.conditional_assets_tests"/>
-1
View File
@@ -99,7 +99,6 @@
# We can reduce the size of loaded assets in POS UI by selectively
# loading the `web` assets. We should only include what POS needs.
'point_of_sale.pos_assets_backend': [
('include', 'web.assets_common'),
('include', 'web.assets_backend'),
('remove', 'web/static/src/core/errors/error_handlers.js'),
('remove', 'web/static/src/legacy/legacy_rpc_error_handler.js'),
@@ -4,6 +4,7 @@
<template id="point_of_sale.assets_common" name="POS Assets Common">
<t t-call-assets="point_of_sale.pos_assets_backend_style" t-js="false"/>
<t t-call-assets="point_of_sale.assets" t-js="false" />
<t t-call-assets="web.assets_common" t-css="false" />
<t t-call-assets="point_of_sale.pos_assets_backend" t-css="false" />
<t t-call-assets="point_of_sale.assets" t-css="false" />
</template>
+5 -2
View File
@@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tools import mute_logger
from odoo.tests.common import HttpCase
from odoo.tests.common import HttpCase, tagged
EXTRA_REQUEST = 2 - 1
""" During tests, the query on 'base_registry_signaling, base_cache_signaling'
@@ -140,10 +140,13 @@ class TestWebsitePerformance(UtilPerf):
self.assertEqual(self._get_url_hot_query(self.page.url), 6)
self.assertEqual(self._get_url_hot_query(self.page.url, cache=False), 10)
@tagged('-at_install', 'post_install')
class TestWebsitePerformancePost(UtilPerf):
@mute_logger('odoo.http')
def test_50_perf_sql_web_assets(self):
# assets route /web/assets/..
self.url_open('/') # create assets attachments
self.env['ir.qweb']._generate_asset_nodes('web.assets_common', css=False, js=True)
assets_url = self.env['ir.attachment'].search([('url', '=like', '/web/assets/%/web.assets_common%.js')], limit=1).url
self.assertEqual(self._get_url_hot_query(assets_url), 4)
self.assertEqual(self._get_url_hot_query(assets_url, cache=False), 4)