[imp] add batch information to delivery slip and some formating

This commit is contained in:
Niels Göttsch 2024-07-01 21:37:31 +02:00
parent 515e271fe7
commit 3b4b3f49ff
3 changed files with 22 additions and 16 deletions

View file

@ -30,7 +30,7 @@
<record id="action_report_ekg_delivery" model="ir.actions.report"> <record id="action_report_ekg_delivery" model="ir.actions.report">
<field name="name">EKG Delivery Slip</field> <field name="name">EKG Delivery Slip</field>
<field name="model">stock.picking</field> <field name="model">stock.picking</field>
<field name="report_type">qweb-pdf</field> <field name="report_type">qweb-html</field>
<field name="report_name">nfu_ekg_stock.report_ekg_deliveryslip</field> <field name="report_name">nfu_ekg_stock.report_ekg_deliveryslip</field>
<field name="report_file">nfu_ekg_stock.report_deliveryslip</field> <field name="report_file">nfu_ekg_stock.report_deliveryslip</field>
<field <field

View file

@ -1,8 +1,14 @@
td.fit, td.batch,
th.fit { th.batch {
width: 0; width: 80px;
max-width: 80px;
white-space: nowrap;
}
th.qty {
width: 60px;
max-width: 60px;
white-space: nowrap; white-space: nowrap;
min-width: fit-content;
} }
th.partner { th.partner {

View file

@ -7,26 +7,26 @@
<div class="scissors"/> <div class="scissors"/>
<div class="page" style="page-break-inside: avoid;"> <div class="page" style="page-break-inside: avoid;">
<div class="row mt32"> <div class="row mt16">
<div class="col-auto" name="div_name" t-if="partner"> <div class="col-auto" name="div_name" t-if="partner">
<strong><span t-field="partner.name"/></strong> <strong><span t-field="partner.name"/></strong>
</div> </div>
</div> </div>
<table class="table table-sm" name="stock_move_table"> <table class="table table-sm" name="stock_move_table" style="font-size: smaller">
<thead> <thead>
<tr> <tr>
<th class="fit" name="th_sm_product_qty"><strong>Batch Size</strong></th> <th class="batch text-start" name="th_sm_product_qty"><strong>Batch Size</strong></th>
<th name="th_sm_product"><strong>Product</strong></th> <th class="text-start" name="th_sm_product"><strong>Product</strong></th>
<th class="fit" name="th_sm_ordered"><strong>Ordered</strong></th> <th class="qty text-end" name="th_sm_ordered"><strong>Available</strong></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<t t-set="lines" t-value="o.move_ids.filtered(lambda x: x.product_uom_qty)"/> <t t-set="lines" t-value="o.move_ids.filtered(lambda x: x.product_uom_qty)"/>
<tr t-foreach="lines" t-as="move"> <tr t-foreach="lines" t-as="move">
<td class="fit"> <td class="batch text-truncate">
<!-- Needs to be filled later --> <t t-foreach="move.product_id.packaging_ids" t-as="packaging">
<!-- <span t-field="move.product_uom_qty"/> --> <span t-esc="packaging.name"/>
<!-- <span t-field="move.product_uom"/> --> </t>
</td> </td>
<td> <td>
<span t-field="move.product_id.name"/> <span t-field="move.product_id.name"/>
@ -36,8 +36,8 @@
<span t-field="move.description_picking"/> <span t-field="move.description_picking"/>
</p> </p>
</td> </td>
<td class="fit"> <td class="text-end">
<span t-field="move.product_uom_qty"/> <span t-field="move.forecast_availability"/>
<span t-field="move.product_uom"/> <span t-field="move.product_uom"/>
</td> </td>