[IMP] stock, delivery: usability changes in the delivery slip report.
Add the total weight of the picking on the delivery slip (next to the date field) (only if different than 0) Add a column "HS code" on the product line if there is at least one product with an HS code task-1889404 Closes #29209
This commit is contained in:
committed by
William Henrotin
parent
ce00210b61
commit
eccabdab42
@@ -1,21 +1,37 @@
|
||||
<odoo>
|
||||
<template id="report_delivery_document2" inherit_id="stock.report_delivery_document">
|
||||
<xpath expr="//th[@name='td_sched_date_h']" position="after">
|
||||
<th t-if="o.picking_type_id.code == 'outgoing' and o.carrier_id"><strong>Carrier</strong></th>
|
||||
<th t-if="o.shipping_weight"><strong>Shipping Weight</strong></th>
|
||||
<th t-if="o.carrier_tracking_ref"><strong>Tracking Number</strong></th>
|
||||
</xpath>
|
||||
<xpath expr="//td[@name='td_sched_date']" position="after">
|
||||
<td t-if="o.picking_type_id.code == 'outgoing' and o.carrier_id">
|
||||
<span t-field="o.carrier_id"/>
|
||||
</td>
|
||||
<td t-if="o.shipping_weight">
|
||||
<xpath expr="//div[@name='div_sched_date']" position="after">
|
||||
<div t-if="o.picking_type_id.code == 'outgoing' and o.carrier_id" class="col-auto">
|
||||
<strong>Carrier:</strong>
|
||||
<p t-field="o.carrier_id"/>
|
||||
</div>
|
||||
<div t-if="o.shipping_weight" class="col-auto">
|
||||
<strong>Weight:</strong>
|
||||
<br/>
|
||||
<span t-field="o.shipping_weight"/>
|
||||
<span t-field="o.weight_uom_name"/>
|
||||
</td>
|
||||
<td t-if="o.carrier_tracking_ref">
|
||||
<span t-field="o.carrier_tracking_ref"/>
|
||||
</td>
|
||||
</div>
|
||||
<div t-if="o.carrier_tracking_ref" class="col-auto">
|
||||
<strong>Tracking Number:</strong>
|
||||
<p t-field="o.carrier_tracking_ref"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//table[@name='stock_move_table']/thead/tr" position="inside">
|
||||
<t t-set="has_hs_code" t-value="o.move_lines.filtered(lambda l: l.product_id.hs_code)"/>
|
||||
<th t-if="has_hs_code"><strong>HS Code</strong></th>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//table[@name='stock_move_table']/tbody/tr" position="inside">
|
||||
<td t-if="has_hs_code"><span t-field="move.product_id.hs_code"/></td>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//table[@name='stock_move_line_table']/thead/tr" position="inside">
|
||||
<th t-if="has_hs_code"><strong>HS Code</strong></th>
|
||||
</xpath>
|
||||
<xpath expr="//table[@name='stock_move_line_table']/tbody/tr" position="inside">
|
||||
<td t-if="has_hs_code"><span t-field="move_line.product_id.hs_code"/></td>
|
||||
</xpath>
|
||||
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
<odoo>
|
||||
<template id="report_package_barcode_delivery" inherit_id="stock.report_package_barcode">
|
||||
<xpath expr="//div[hasclass('o_packaging_type')]" position="after">
|
||||
<div class="row o_package_weight" t-if="o.weight">
|
||||
<div class="col-12" style="font-weight:bold;">Weight: <span t-field="o.weight"/></div>
|
||||
</div>
|
||||
<div class="row o_package_shipping_weight" t-if="o.shipping_weight">
|
||||
<div class="col-12" style="font-weight:bold;">Shipping Weight: <span t-field="o.shipping_weight"/></div>
|
||||
</div>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th t-if="o.shipping_weight"><strong>Shipping Weight</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td t-if="o.shipping_weight">
|
||||
<span t-field="o.shipping_weight"/>
|
||||
<t t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().name"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="report_package_barcode_small_delivery" inherit_id="stock.report_package_barcode_small">
|
||||
<xpath expr="//div[hasclass('o_packaging_type')]" position="after">
|
||||
<div class="row o_package_weight" t-if="o.weight">
|
||||
<div class="col-12" style="font-size:24px; font-weight:bold;">Weight: <span t-field="o.weight"/></div>
|
||||
</div>
|
||||
<div class="row o_package_shipping_weight" t-if="o.shipping_weight">
|
||||
<div class="col-12" style="font-size:24px; font-weight:bold;">Shipping Weight: <span t-field="o.shipping_weight"/></div>
|
||||
</div>
|
||||
|
||||
@@ -17,32 +17,22 @@
|
||||
<h2>
|
||||
<span t-field="o.name"/>
|
||||
</h2>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th t-if="o.origin"><strong>Order</strong></th>
|
||||
<th name="td_sched_date_h">
|
||||
<strong>Date</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td t-if="o.origin">
|
||||
<span t-field="o.origin"/>
|
||||
</td>
|
||||
<td name="td_sched_date">
|
||||
<t t-if="o.state == 'done'">
|
||||
<span t-field="o.date_done"/>
|
||||
</t>
|
||||
<t t-if="o.state != 'done'">
|
||||
<span t-field="o.scheduled_date"/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm mt48" t-if="o.state!='done'">
|
||||
<div class="row mt32 mb32">
|
||||
<div t-if="o.origin" class="col-auto">
|
||||
<strong>Order:</strong>
|
||||
<p t-field="o.origin"/>
|
||||
</div>
|
||||
<div t-if="o.state" class="col-auto" name="div_sched_date">
|
||||
<strong>Shipping Date:</strong>
|
||||
<t t-if="o.state == 'done'">
|
||||
<p t-field="o.date_done" t-options='{"widget": "date"}'/>
|
||||
</t>
|
||||
<t t-if="o.state != 'done'">
|
||||
<p t-field="o.scheduled_date" t-options='{"widget": "date"}'/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm" t-if="o.state!='done'" name="stock_move_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
@@ -68,7 +58,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm mt48" t-if="o.move_line_ids and o.state=='done'">
|
||||
<table class="table table-sm mt48" t-if="o.move_line_ids and o.state=='done'" name="stock_move_line_table">
|
||||
<t t-set="has_serial_number" t-value="o.move_line_ids.mapped('lot_id')" />
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user