|
|
@ -116,24 +116,39 @@ odoo.define('vracoop_pos_free_balance_V2.container_balance', function (require) |
|
|
|
$("#pos-topheader-scale").addClass('oe_hidden'); |
|
|
|
}, |
|
|
|
|
|
|
|
_get_active_pricelist: function(){ |
|
|
|
var current_order = this.pos.get_order(); |
|
|
|
var current_pricelist = this.pos.default_pricelist; |
|
|
|
|
|
|
|
if (current_order) { |
|
|
|
current_pricelist = current_order.pricelist; |
|
|
|
} |
|
|
|
|
|
|
|
return current_pricelist; |
|
|
|
}, |
|
|
|
|
|
|
|
get_product_name: function(){ |
|
|
|
var product = this.gui.get_current_screen_param('product'); |
|
|
|
|
|
|
|
|
|
|
|
return (product ? product.display_name : undefined) || 'Unnamed Product'; |
|
|
|
}, |
|
|
|
// get_product_price: function(){
|
|
|
|
// var product = this.gui.get_current_screen_param('product');
|
|
|
|
// return (product ? product.get_price(pricelist, 2) : 0) || 0;
|
|
|
|
// },
|
|
|
|
// get_product_uom: function(){
|
|
|
|
// var product = this.gui.get_current_screen_param('product');
|
|
|
|
|
|
|
|
// if(product){
|
|
|
|
// return this.pos.units_by_id[product.uom_id[0]].name;
|
|
|
|
// }else{
|
|
|
|
// return '';
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
get_product_price: function(){ |
|
|
|
var product = this.gui.get_current_screen_param('product'); |
|
|
|
var pricelist = this._get_active_pricelist(); |
|
|
|
console.log(pricelist); |
|
|
|
return (product ? product.get_price(pricelist, 1) : 0) || 0; |
|
|
|
}, |
|
|
|
|
|
|
|
get_product_uom: function(){ |
|
|
|
var product = this.gui.get_current_screen_param('product'); |
|
|
|
|
|
|
|
if(product){ |
|
|
|
return this.pos.units_by_id[product.uom_id[0]].name; |
|
|
|
}else{ |
|
|
|
return ''; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
@ -545,14 +560,6 @@ odoo.define('vracoop_pos_free_balance_V2.container_balance', function (require) |
|
|
|
var product = this.get_product(); |
|
|
|
console.log(product); |
|
|
|
this.gui.show_screen('confirmation',{product: product}); |
|
|
|
// self.gui.show_screen(self.next_screen);
|
|
|
|
// self.gui.show_popup('confirm-pesee',{
|
|
|
|
// 'title': _t('Merci'),
|
|
|
|
// 'body': _t('La pesée est validée'),
|
|
|
|
// confirm: function(){
|
|
|
|
// self.gui.show_screen(self.next_screen);
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|