Skip to Content
Menu
This question has been flagged
2751 Views


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
Discard
Related Posts Replies Views Activity
1
Jun 22
2741
1
Sep 23
5910
2
Jan 19
3129
2
Feb 18
8877
0
Jun 17
2802