[FIX] point_of_sale: Show price without discount in receipt

Current behavior:
When a discount is applied to a product, the receipt shows the price
with the discount applied as the base price.

Steps to reproduce:
- Open PoS
- Add a product to the order
- Apply a discount to the product with the numpad
- Validate the order
- Check the receipt, the base price of the product is the price with the
  discount applied.

(https://github.com/odoo/odoo/assets/32939472/eb0998a7-70a1-432a-8909-868d9307c999)
The price in red should be 70$ (the price without the 5% discount)

opw-3463745

closes odoo/odoo#134045

X-original-commit: d6e4e7c566324de3ef9589b92cacd32d6c386465
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-09-04 10:56:09 +00:00
parent 43882882eb
commit e28e1a079f
2 changed files with 2 additions and 1 deletions
@@ -203,7 +203,7 @@
<t t-esc="env.utils.formatCurrency(line.price_with_tax_before_discount, false)"/>
</t>
<t t-else="">
<t t-esc="env.utils.formatCurrency(line.price, false)"/>
<t t-esc="env.utils.formatCurrency(line.unitDisplayPriceBeforeDiscount, false)"/>
</t>
</div>
</t>
@@ -819,6 +819,7 @@ export class Orderline extends PosModel {
pack_lot_lines: this.get_lot_lines(),
customer_note: this.get_customer_note(),
taxed_lst_unit_price: this.get_taxed_lst_unit_price(),
unitDisplayPriceBeforeDiscount: this.getUnitDisplayPriceBeforeDiscount(),
};
}
generate_wrapped_product_name() {