Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5249 Widoki

I want to add UI blocker functionality (which is implemented by Odoo team themselves in web.framework module) to an existing javascript file in my own addon for Odoo 13.0+e (Enterprise Edition).

Before my changes, the JS module was tested and is working fine.

As soon as I add the following line:

let framework = require('web.framework');

Odoo stops loading the module and reports in Chrome console:

warning: Some modules could not be started
Missing dependencies:     (1) ["web.framework"]
Non loaded modules:     (1) ["my_addon.my_js_module"]  

When I activate developer mode in Odoo settings, I see that indeed browser loads many files from addons\web\static\src\js\core folder, except file misc.js where web.framework is defined.

I did Upgrade command on my module, I restarted Odoo, I tried developer and production modes and loaded the website with Disable cache setting - nothing helps, web.framework module is not loaded into my addon module.

The problematic js file also has other module dependencies:

let ajax = require('web.ajax');
let core = require('web.core');

and those are working fine. Only web.framework is breaking.

What's going on? How do I enforce loading of web.framework?


Updated later because I cannot reply in comments to others yet (not enough karma):


Komal said: 

write var framework = require('web.framework');

<- yes, that's what I did.


and add web in depends

<- How exactly do I do that?

And how would it help to load web.framework if the other web modules (web.ajax, web.core) are loaded normally? Doesn't this mean that web module has already been added? Odoo does not load only misc.js file from that module. Other files for ajax and core are being already loaded fine.

Awatar
Odrzuć
Autor

For a clean test, I just tried a Bitnami Odoo v13 installation and Website app. I customized the JS code for the webiste and have the issue - the JS module is not loaded anymore as soon as I add

var framework = require('web.framework');

Najlepsza odpowiedź

did you find a solution please? same problem in v15

Awatar
Odrzuć
Najlepsza odpowiedź

write var framework = require('web.framework');

and add web in depends

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lip 25
405
1
lip 25
5286
0
lip 25
831
0
cze 25
843
1
cze 25
1017