-
- Downloads
[IMP] base/web: XML templates are added into the asset bundles.
XML files are now declared in python module manifests. During the qweb 't-call-asset' directive, assetbundle will fetch the declared xml files, apply the inheritance (t-inherit) and create a javascript service (for eg: 'web.assets_backend.bundle.xml') which is added at the end of the *.js mimifier file. When the debug mode is activated, comments are added in the template indicating which file the template comes from as well as the inheritances applied to it. **** JavaScript: assets.js (module @web/core/assets) takes care of loading libraries, javascripts and styles. `loadJS(url)` (loads the javascript and returns a resolved promise when the templates are also loaded via the '*.bundle.xml' service) `loadCSS(url)` (loads the style a resolved promise when the file is loaded) `loadXML(xml, app=assets.defaultApp)` (load template into application/owl, used by the `*.bundle.xml` services) `getBundle(bundleName)` (get the bundle descriptor) `loadBundle(desc)` (load the files and bundle from a descriptor) templates (XML element content all owl templates) A new `ready(serviceName)` method on boot.js lets you know when a service is loaded are the require. The xmlDependencies attribute no longer exists. Python: The xmls taken into account by assetbundle.py, applying `t-inherit` inheritances and adding an `name_of_the_bundle.bundle.xml` service in the generated JavaScript file. **** Every manifest changes is into the next commit, except 'web_tour' in this current commit as example. Part-of: odoo/odoo#95500
Showing
- addons/mail/models/ir_http.py 0 additions, 3 deletionsaddons/mail/models/ir_http.py
- addons/mail/static/src/public/discuss_public_boot.js 2 additions, 5 deletionsaddons/mail/static/src/public/discuss_public_boot.js
- addons/mail/views/discuss_public_templates.xml 0 additions, 1 deletionaddons/mail/views/discuss_public_templates.xml
- addons/mrp_subcontracting/controllers/portal.py 0 additions, 3 deletionsaddons/mrp_subcontracting/controllers/portal.py
- addons/mrp_subcontracting/views/subcontracting_portal_templates.xml 0 additions, 1 deletion..._subcontracting/views/subcontracting_portal_templates.xml
- addons/point_of_sale/views/pos_assets_index.xml 0 additions, 1 deletionaddons/point_of_sale/views/pos_assets_index.xml
- addons/project/controllers/portal.py 0 additions, 4 deletionsaddons/project/controllers/portal.py
- addons/project/views/project_sharing_templates.xml 0 additions, 1 deletionaddons/project/views/project_sharing_templates.xml
- addons/web/__manifest__.py 1 addition, 0 deletionsaddons/web/__manifest__.py
- addons/web/controllers/main.py 0 additions, 1 deletionaddons/web/controllers/main.py
- addons/web/controllers/utils.py 0 additions, 209 deletionsaddons/web/controllers/utils.py
- addons/web/controllers/webclient.py 14 additions, 19 deletionsaddons/web/controllers/webclient.py
- addons/web/models/ir_http.py 10 additions, 3 deletionsaddons/web/models/ir_http.py
- addons/web/static/src/boot.js 106 additions, 85 deletionsaddons/web/static/src/boot.js
- addons/web/static/src/core/assets.js 170 additions, 90 deletionsaddons/web/static/src/core/assets.js
- addons/web/static/src/legacy/js/assets.js 23 additions, 0 deletionsaddons/web/static/src/legacy/js/assets.js
- addons/web/static/src/legacy/js/core/ajax.js 0 additions, 248 deletionsaddons/web/static/src/legacy/js/core/ajax.js
- addons/web/static/src/legacy/js/core/service_mixins.js 0 additions, 10 deletionsaddons/web/static/src/legacy/js/core/service_mixins.js
- addons/web/static/src/legacy/js/core/session.js 2 additions, 25 deletionsaddons/web/static/src/legacy/js/core/session.js
- addons/web/static/src/legacy/js/core/widget.js 3 additions, 15 deletionsaddons/web/static/src/legacy/js/core/widget.js
Loading
Please register or sign in to comment