我在Odoo v8
中创建了一个新模块,我想从static/src/js
中定义的JavaScript文件调用在该模块的controllers文件夹中定义的python函数。
我试过以下方法:
一。
function openerp_pos_models(instance){
var myModel = new instance.web.Model('my.model');
//code to call python method
});
但在加载页面时,它会显示instance is not defined
。
2。
var Users = new openerp.web.Model('res.users');
但这表明Uncaught TypeError: Cannot read property 'Model' of undefined
。
目前没有回答
相关问题 更多 >
编程相关推荐