[imp] mark unfinished batches red

This commit is contained in:
Niels Göttsch 2024-07-30 16:21:18 +02:00
parent d815505705
commit 61c1ad297c

View file

@ -3,10 +3,12 @@
<template id="cart_lines_packaging" inherit_id="website_sale.cart_lines" name="Shopping Cart Lines">
<xpath expr="//td[hasclass('td-product_name')]" position="inside">
<div t-if="line.product_packaging_id and (line.product_packaging_id.qty != 1)">
<span>Open Package: <t t-esc="line.compute_open_packages()"/>/<t
t-esc="line.product_packaging_id.qty"
/><br/></span>
<span>Ordered Quantity: <t t-esc="line.batch_uom_max_qty"/></span>
<span>Open Package: <t t-esc="line.compute_open_packages()"/>/<t t-esc="line.product_packaging_id.qty"/>
</span><br/>
<span>Max Ordered Quantity: <span
t-esc="line.batch_uom_max_qty"
t-attf-class="#{'text-danger' if line.batch_uom_max_qty &lt; line.product_packaging_id.qty else ''}"
/></span>
</div>
</xpath>
<xpath expr="//th[hasclass('td-qty')]" position="after">
@ -85,10 +87,13 @@
<template id="cart_summary_packaging" inherit_id="website_sale.cart_summary" name="Cart right column">
<xpath expr="//td[hasclass('td-product_name')]" position="inside">
<div>
<span t-if="line.product_packaging_id">Open Package: <t t-esc="line.product_packaging_id.qty"/><br
<div t-if="line.product_packaging_id and (line.product_packaging_id.qty != 1)">
<span>Open Package: <t t-esc="line.compute_open_packages()"/>/<t t-esc="line.product_packaging_id.qty"/>
</span><br/>
<span>Max Ordered Quantity: <span
t-esc="line.batch_uom_max_qty"
t-attf-class="#{'text-danger' if line.batch_uom_max_qty &lt; line.product_packaging_id.qty else ''}"
/></span>
<span t-if="line.batch_uom_qty &gt; 0">Ordered Quantity: <t t-esc="line.batch_uom_qty"/></span>
</div>
</xpath>
<xpath expr="//th[hasclass('td-qty')]" position="after">