I'm porting an addon I wrote for Odoo17 to v18, and it's going well.
One issue I'm still unable to figure out is related to the inclusion of a pretty simple JS asset, marked with @odoo-module
: while it works as expected un v17, with v18 I get an odoo.define is not a function
error in the browser. The reason is that in the latter case it is emitted at the very beginning of web.assets_web.min.js
, before the module_loader.js
library that defines that function.
In both environments I declared it in the web.assets_backend
slot of the assets
entry of the top-level __manifest__.py
of the addon:
'assets': {'web.assets_backend': ['my_addon/static/src/snippet.js']}
I have read several different addons in the standard community edition source, but could not spot a way to influence the inclusion order, that AFAICT when written that way it should be appended to the bundle...
What am I missing?
Thanks in advance for any hint!