I've followed what the docs and various tutorials say about creating custom JS modules.
I created this file
console.log("I'm here!!");
openerp.mymodule = function(instance){
console.log("loading my module...");
};
and placed it in the static/src/js folder of the module. I added this path to the "js" key of the manifest file.
When I open the browser console and load the page, "I'm here" does get printed, but "loading my module..." never does. What am I missing?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
6863
查看
It depends. If you are using JS on v7 or V8.
In v7 you can add it to __openerp__.py.
In v8 you have to add it to views
Anyways, I think that you made it work. So the main reason must be:
you module name is not named 'mymodule'
in order to make it work please set that openerp.module_name
Duh! That was it. Thank you very much,
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
3
8月 22
|
9572 | ||
|
1
3月 22
|
6230 | ||
|
2
6月 18
|
8790 | ||
|
0
3月 15
|
3439 | ||
|
2
7月 25
|
350 |