콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4738 화면

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.

아바타
취소
작성자

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');

베스트 답변

did you find a solution please? same problem in v15

아바타
취소
베스트 답변

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

and add web in depends

아바타
취소
관련 게시물 답글 화면 활동
1
5월 25
758
0
3월 25
404
1
12월 24
2937
2
11월 24
1216
1
10월 24
1771