diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-06-30 10:33:39 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-06-30 18:09:32 +0200 |
| commit | 82a9b77f54152c4b4cf3e51960eaa9b4272dea03 (patch) | |
| tree | d4a4504e095e8dcb88ca08d941fb231c5658f0d5 /addons/pos_restaurant/static/src/js/multiprint.js | |
| parent | 58742a5dd5069d4b7043c511f76a32101003f8ff (diff) | |
[FIX] pos_restaurant: order of kitchen ticket
When the kitchen ticket is printed, the order lines appear jumbled in
comparison to what is displayed on the PoS interface. This is an issue
since the kitchen cannot link main and side dishes for a given guest.
For example, the following order:
- Steak
- Fries
- Salmon
- Pasta
- Chicken
- Salad
On the kitchen ticket, this could appear as:
- Salmon
- Salad
- Chicken
- Steak
- Fries
- Pasta
The order actually depends on the product id.
The fix is to use the order line id instead of the product id in the
resume dictionary. Although a dictionary is an unordered collection,
most browsers keep the dictionary ordered. For example:
```
var a = {"18": "18", "1": "1", "21": "21", "14": "14"};
for(var i in a) { console.log(i) };
1
14
18
21
```
opw-680796
Diffstat (limited to 'addons/pos_restaurant/static/src/js/multiprint.js')
| -rw-r--r-- | addons/pos_restaurant/static/src/js/multiprint.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js index 19c76a30a4c..6ee225dc0c6 100644 --- a/addons/pos_restaurant/static/src/js/multiprint.js +++ b/addons/pos_restaurant/static/src/js/multiprint.js @@ -133,9 +133,9 @@ models.Orderline = models.Orderline.extend({ }, get_line_diff_hash: function(){ if (this.get_note()) { - return this.get_product().id + '|' + this.get_note(); + return this.id + '|' + this.get_note(); } else { - return '' + this.get_product().id; + return '' + this.id; } }, }); |
