Skip to Content
Menú
This question has been flagged
3442 Vistes


models.load_models({

model: 'stock.production.lot',
fields: ['id','name','product_id','total_qty','life_date'],
domain: function(self){ //done


loaded: function(self,list_lot){

self.list_lot = list_lot;

},
});


var PackLotLinePopupWidget = PopupWidget.extend({
template: 'PackLotLinePopupWidget',
events: _.extend({}, PopupWidget.prototype.events, {
'click .remove-lot': 'remove_lot',
'keydown': 'add_lot',
'blur .packlot-line-input': 'lose_input_focus'
}),

show: function(options){
var self = this;
var product_lot = [];
var lot_list = self.pos.list_lot;

for(var i=0;i<lot_list.length;i++){
if(lot_list[i].product_id[0] == options.pack_lot_lines.order_line.product.id){
product_lot.push(lot_list[i]);
}
}
options.product_lot = product_lot;
this._super(options);
this.focus();
},


Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 22
3523
0
d’abr. 25
1218
1
de set. 23
7350
2
de gen. 19
4006
2
de febr. 18
10585