[FIX] point_of_sale: Correctly update rewards after scanning a product

Current behavior:
When scanning a product that should trigger a reward, the reward was not
applied.

Steps to reproduce:
- Create a reward that applies a 10% discount on specific products
  (e.g. Whiteboard pen)
- Make sure a barcode is set on the Whiteboard pen product
- Open a PoS, and scan the Whiteboard pen product barcode
- The reward is not applied

opw-3373435

closes odoo/odoo#129406

X-original-commit: 9991d923ec0e7fc74e5d319d43a0052e6e4d7416
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
This commit is contained in:
roen-odoo
2023-07-25 17:35:52 +02:00
parent bc95c6a348
commit 21392ab236
@@ -107,4 +107,8 @@ patch(ProductScreen.prototype, "pos_loyalty.ProductScreen", {
selectedLine.order._updateRewards();
}
},
async _barcodeProductAction(code) {
await this._super(code);
this.currentOrder._updateRewards();
},
});