Untitled
raw download clone
TEXT
views 34
,
size 987 b
odoo.define('webkul_learning.webkul_learning_test',function(require){
    "use strict";
    var core =require("web.core");
    var ajax =require("web.ajax");
     
    var _t =core._t;
    $(document).on('click','.wk_json_controller',function(e){
        console.log('________________');
        
        var emp_id =$('#wk_input_emp_id').val();
        console.log("-------------------------------------",emp_id);
        ajax.jsonRpc("/website/json/controller",'call',{
            "emp_id":emp_id,
        })
            .then(function(data){
                console.log('----------------pass-----------');
                if(data){
                    $(".wk_name").text(data.name);
                    $(".wk_age").text(data.age);


                }
                console.log("----------------");

            })
            // .fail(function(result){
            //     console.log("---------------fail-----------");
            // });
    });
});
close fullscreen
Login or Register to edit or fork this paste. It's free.