Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Odoo 10.0前端查询数据库以存储数据_Jquery_Rpc_Odoo 10 - Fatal编程技术网

Jquery Odoo 10.0前端查询数据库以存储数据

Jquery Odoo 10.0前端查询数据库以存储数据,jquery,rpc,odoo-10,Jquery,Rpc,Odoo 10,在Odoo 11.0中,我使用此方法存储数据或查询数据库: rpc.query({ model: "sale.order.checklist.line", method: "write", args: [checklist_line_id_int, { answer_yes: value }], }).then(setTimeout(function() { //Set a delay or the update is not visibl

在Odoo 11.0中,我使用此方法存储数据或查询数据库:

rpc.query({
    model: "sale.order.checklist.line",
    method: "write",
    args: [checklist_line_id_int, {
        answer_yes: value
    }],
}).then(setTimeout(function() {
    //Set a delay or the update is not visible
    window.location.reload(true);
}, 300));
我怎样才能在奥多10.0中实现同样的效果? 我需要更新用户更改的值,并使用ajax更新包含解决方案数据的单个div

 //call method that write the new value for checkbox
 var Checklists = new Model('sale.order.checklist.line');
 Checklists.call('write', [checklist_line_id_int, {answer_yes: checkboxValue}]
     ).then(function () {
           window.location.reload();
 });
这段代码编写布尔值。 无论如何,可以在模型内调用方法,而不是编写“write”,只需调用模型内声明的方法的名称,并作为键{}传递所需的参数,以防需要传递它们