Files
test/stock_barcode/static/src/components/grouped_line.xml
qihao.gong@jikimo.com 3c89404543 质量模块和库存扫码
2023-07-24 11:42:15 +08:00

28 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="stock_barcode.GroupedLineComponent" owl="1">
<div t-on-click="select"
class="o_barcode_line list-group-item d-flex flex-row flex-wrap pt-0"
t-att-data-barcode="line.product_id.barcode" t-attf-class="{{componentClasses}}">
<div class="o_barcode_line_summary d-flex flex-grow-1 py-2 mt-2" t-att-class="opened ? 'o_unfolded': ''">
<div class="o_barcode_line_details flex-grow-1">
<t t-call="stock_barcode.LineSourceLocation"/>
<t t-call="stock_barcode.LineTitle"/>
<t t-call="stock_barcode.LineQuantity"/>
<t t-call="stock_barcode.LineDestinationLocation"/>
</div>
<button t-on-click="toggleSublines" class="o_line_button o_toggle_sublines btn btn-primary ms-2 ms-sm-4">
<i t-att-class="'fa fa-2x fa-caret-' + (opened ? 'up' : 'down')"/>
</button>
</div>
<div class="o_sublines mb-2 flex-grow-1" t-if="opened">
<t t-foreach="line.lines" t-as="subline" t-key="subline.virtual_id">
<LineComponent line="subline" displayUOM="props.displayUOM" subline="true"/>
</t>
</div>
</div>
</t>
</templates>