diff options
| author | Joren Van Onder <jov@odoo.com> | 2017-08-08 14:10:22 -0700 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2017-08-18 13:56:39 -0700 |
| commit | 89cade3bffc82159012b9be1e53f7cfd19a1104e (patch) | |
| tree | 4d60322bf8603e5740f71984d2e979d95b58de4d /addons/pos_restaurant/static/src/js/multiprint.js | |
| parent | 110bf158f68cc3066dc8cd1f6e47b1dd04ae7fac (diff) | |
[FIX] pos_restaurant: wrap product names on OrderChangeReceipt
Reuse generate_wrapped_product_name() which was implemented for
regular POS receipts at 62a8def91889bbe8f2207bb4c0067f2274ae93e6.
Fixes #18688
Diffstat (limited to 'addons/pos_restaurant/static/src/js/multiprint.js')
| -rw-r--r-- | addons/pos_restaurant/static/src/js/multiprint.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js index 8dc63ea07fc..65956ffa66d 100644 --- a/addons/pos_restaurant/static/src/js/multiprint.js +++ b/addons/pos_restaurant/static/src/js/multiprint.js @@ -191,7 +191,12 @@ models.Order = models.Order.extend({ var product_id = line.get_product().id; if (typeof resume[line_hash] === 'undefined') { - resume[line_hash] = { qty: qty, note: note, product_id: product_id }; + resume[line_hash] = { + qty: qty, + note: note, + product_id: product_id, + product_name_wrapped: line.generate_wrapped_product_name(), + }; } else { resume[line_hash].qty += qty; } @@ -222,6 +227,7 @@ models.Order = models.Order.extend({ add.push({ 'id': curr.product_id, 'name': this.pos.db.get_product_by_id(curr.product_id).display_name, + 'name_wrapped': curr.product_name_wrapped, 'note': curr.note, 'qty': curr.qty, }); @@ -229,6 +235,7 @@ models.Order = models.Order.extend({ add.push({ 'id': curr.product_id, 'name': this.pos.db.get_product_by_id(curr.product_id).display_name, + 'name_wrapped': curr.product_name_wrapped, 'note': curr.note, 'qty': curr.qty - old.qty, }); @@ -236,6 +243,7 @@ models.Order = models.Order.extend({ rem.push({ 'id': curr.product_id, 'name': this.pos.db.get_product_by_id(curr.product_id).display_name, + 'name_wrapped': curr.product_name_wrapped, 'note': curr.note, 'qty': old.qty - curr.qty, }); @@ -248,6 +256,7 @@ models.Order = models.Order.extend({ rem.push({ 'id': old.product_id, '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, }); |
