summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2019-08-22 09:57:48 +0000
committerPierre Masereel <pim@odoo.com>2019-08-22 13:24:13 +0000
commit4645b07731e8992bf3e0096f659b821e9e4227ab (patch)
treecdc39b32f8af09c6f069e1d0e9e104829e977d43 /addons/pos_restaurant/static/src
parent7fa823977afa7a29be0e130fed3145353ed3d6c4 (diff)
[FIX] pos_epson_printer_restaurant: call to super
The model PosModel is extended, and super is calaled as if it was included, we have fixed it by calling the parent prototype correctly.
Diffstat (limited to 'addons/pos_restaurant/static/src')
-rw-r--r--addons/pos_restaurant/static/src/js/multiprint.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js
index 802b95c4529..e2fea909c04 100644
--- a/addons/pos_restaurant/static/src/js/multiprint.js
+++ b/addons/pos_restaurant/static/src/js/multiprint.js
@@ -23,7 +23,7 @@ models.PosModel = models.PosModel.extend({
models.load_models({
model: 'restaurant.printer',
- fields: ['name','proxy_ip','product_categories_ids'],
+ fields: ['name','proxy_ip','product_categories_ids', 'printer_type'],
domain: null,
loaded: function(self,printers){
var active_printers = {};
@@ -63,17 +63,17 @@ models.Orderline = models.Orderline.extend({
// mp dirty is true if this orderline has changed
// since the last kitchen print
// it's left undefined if the orderline does not
- // need to be printed to a printer.
+ // need to be printed to a printer.
this.mp_dirty = this.printable() || undefined;
- }
+ }
if (!this.mp_skip) {
// mp_skip is true if the cashier want this orderline
// not to be sent to the kitchen
this.mp_skip = false;
}
},
- // can this orderline be potentially printed ?
+ // can this orderline be potentially printed ?
printable: function() {
return this.pos.db.is_product_in_category(this.pos.printers_categories, this.get_product().id);
},
@@ -94,8 +94,8 @@ models.Orderline = models.Orderline.extend({
}
_super_orderline.set_quantity.apply(this,arguments);
},
- can_be_merged_with: function(orderline) {
- return (!this.mp_skip) &&
+ can_be_merged_with: function(orderline) {
+ return (!this.mp_skip) &&
(!orderline.mp_skip) &&
_super_orderline.can_be_merged_with.apply(this,arguments);
},
@@ -236,7 +236,7 @@ models.Order = models.Order.extend({
'name': this.pos.db.get_product_by_id(old.product_id).display_name,
'name_wrapped': old.product_name_wrapped,
'note': old.note,
- 'qty': old.qty,
+ 'qty': old.qty,
});
}
}
@@ -249,7 +249,7 @@ models.Order = models.Order.extend({
var _add = [];
var _rem = [];
-
+
for(var i = 0; i < add.length; i++){
if(self.pos.db.is_product_in_category(categories,add[i].id)){
_add.push(add[i]);
@@ -282,7 +282,7 @@ models.Order = models.Order.extend({
'minutes': minutes,
},
};
-
+
},
printChanges: function(){
var printers = this.pos.printers;