[FIX] stock: print ZPL label with “product.product” price

Steps to reproduce the bug:
- Create a storable product “P1”:
    - set sales price: 10
    - Go to attributes & variants tab:
        - Color: red & blue
        - Size: S

- Go to Red attribute and add extra price: 5
- Go to the product variant “P1 red S”
- Print label:
    - ZPL with price

Problem:
The product.template price is printed instead of the product variant
because we use “list_price” instead of “lst_price”

opw-3537277

closes odoo/odoo#137786

X-original-commit: ea632652be5d4b1cbdf19f68c1a4db1ffc3cfb99
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This commit is contained in:
Djamel Touati
2023-10-06 09:39:28 +00:00
parent fed6bb12c1
commit c8445d32ae
+2 -2
View File
@@ -21,10 +21,10 @@
^FO600,100,1
^CI28
<t t-if="product.currency_id.position == 'after'">
^A0N,66,48^FH^FD<t t-esc="product.list_price" t-options='{"widget": "float", "precision": 2}'/><t t-esc="product.currency_id.symbol"/>^FS
^A0N,66,48^FH^FD<t t-esc="product.lst_price if 'lst_price' in product else product.list_price" t-options='{"widget": "float", "precision": 2}'/><t t-esc="product.currency_id.symbol"/>^FS
</t>
<t t-if="product.currency_id.position == 'before'">
^A0N,66,48^FH^FD<t t-esc="product.currency_id.symbol"/><t t-esc="product.list_price" t-options='{"widget": "float", "precision": 2}'/>^FS
^A0N,66,48^FH^FD<t t-esc="product.currency_id.symbol"/><t t-esc="product.lst_price if 'lst_price' in product else product.list_price" t-options='{"widget": "float", "precision": 2}'/>^FS
</t>
</t>
<t t-if="barcode">