This question has been flagged
2074 Views

hello,


I try to recover my object 'stock.production.lot' in POS with one ID.

So I used .query, shown in the odoo's tutorial, and I have :

 var Model = require('web.Model'); 
var model = new Model('stock.production.lot');
     model.query(['suggested_price'])
    .filter([['id', '=', line.get_serial()]])
    .done(function (stock) { 
        line.set_price(stock.suggested_price) ;
     }

with line = new pos_model.Orderline({}, {pos: this.pos, order: this, product: product});


and get_serial() is a Orderline's function return one id


But is I add this code, my pos.js isn't load on my pos, I think that one error in this code but I don't know where is it.

Avatar
Discard