如何在Odoo中从网站<textarea>写入价值?

时间:2018-07-24 05:42:48

标签: javascript python odoo

我不写网站上的textarea。 我的代码是:

  odoo.define('website_sale.cart',function(require){
    “使用严格”;
    var ajax = require('web.ajax');
    (功能(窗口,文档,未定义){

        var add_comment =函数(ele){
            var store_order = $('#store_order')。val();
            ajax.jsonRpc('/ shop / customer_comment /','call',{
                “ store_order”:store_order
            })。then(函数(数据){
                如果(数据){
                     var store_order1 = document.getElementById('store_order');
                     console.log('comment'+ store_order1);
                     store_order1.innerHTML =“ store_order”;
                }

            });
        };
        window.store_order = store_order1;

    })(窗口,文档);

});
 

而xml是: