Files
odoo_source/odoo/addons/test_assetsbundle/views/views.xml
T
8cc066173d [IMP] *: Improve assets management
This commit changes the way assets are declared in Odoo modules.

Before: assets were declared in template files. Template bundles were
generated from primary templates, so technically any qweb template could
have been called as an asset bundle, with the 't-call-assets' directive.

Being standard qweb templates, they had access to standard HTML tags
(script, link, with or without raw scripts or style definition), qweb
directives (t-call, t-raw, etc.) and could be inherited by other
templates.

Now: assets are defined in the module's manifest and generated by the
't-call-assets' directive.

More information on the new system can be found on the updated user
documentation (see the "JavaScript Reference" section).

Task: 2352566

Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00

27 lines
565 B
XML

<odoo>
<template id="test_assetsbundle.template1" name="test template 1">
&lt;!DOCTYPE html&gt;
<html>
<head>
<t t-call-assets="test_assetsbundle.bundle1"/>
</head>
<body>
</body>
</html>
</template>
<template id="test_assetsbundle.template2" name="test template 2">
&lt;!DOCTYPE html&gt;
<html>
<head>
<t t-call-assets="test_assetsbundle.bundle4" t-js="False"/>
<meta/>
<t t-call-assets="test_assetsbundle.bundle4" t-css="False"/>
</head>
<body>
</body>
</html>
</template>
</odoo>