[IMP] stock, delivery: usability changes in the picking operations report.
task-1889404 Closes #29209
This commit is contained in:
committed by
William Henrotin
parent
56f5bb2e20
commit
8aebeb2f03
@@ -1,17 +1,16 @@
|
||||
<odoo>
|
||||
<template id="report_shipping2" inherit_id="stock.report_picking">
|
||||
<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.weight"><strong>Weight</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.weight">
|
||||
<span t-field="o.weight"/>
|
||||
<span t-field="o.weight_uom_name"/>
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="report_shipping2" inherit_id="stock.report_picking">
|
||||
<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.weight" class="col-auto">
|
||||
<strong>Weight:</strong>
|
||||
<br/>
|
||||
<span t-field="o.weight"/>
|
||||
<span t-field="o.weight_uom_name"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@@ -44,46 +44,42 @@
|
||||
</div>
|
||||
<br/>
|
||||
<h1 t-field="o.name" class="mt0 float-left"/>
|
||||
<div class="clearfix"/>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th t-if="o.origin"><strong>Order</strong></th>
|
||||
<th><strong>Status</strong></th>
|
||||
<th name="td_sched_date_h" width="20%"><strong>Scheduled Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td t-if="o.origin">
|
||||
<span t-field="o.origin"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.state"/>
|
||||
</td>
|
||||
<td name="td_sched_date" width="20%">
|
||||
<span t-field="o.scheduled_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<table class="table table-sm" t-if="o.move_line_ids">
|
||||
<div class="row mt48 mb32">
|
||||
<div t-if="o.origin" class="col-auto">
|
||||
<strong>Order:</strong>
|
||||
<p t-field="o.origin"/>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<strong>Status:</strong>
|
||||
<p t-field="o.state"/>
|
||||
</div>
|
||||
<div class="col-auto" name="div_sched_date">
|
||||
<strong>Scheduled Date:</strong>
|
||||
<p t-field="o.scheduled_date"/>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm" t-if="o.move_line_ids and o.move_ids_without_package">
|
||||
<t t-set="has_barcode" t-value="any([move_ids_without_package.product_id and move_ids_without_package.product_id.sudo().barcode or move_ids_without_package.package_id for move_ids_without_package in o.move_line_ids])"/>
|
||||
<t t-set="has_serial_number" t-value="o.move_line_ids.filtered(lambda ml: ml.lot_id or ml.lot_name)" groups="stock.group_production_lot"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th><strong>Quantity</strong></th>
|
||||
<th width="20%" t-if="o.picking_type_id.code != 'incoming'" align="left"><strong>From</strong>
|
||||
<th>
|
||||
<strong>Product</strong>
|
||||
</th>
|
||||
<th t-if="o.picking_type_id.code != 'outgoing'"><strong>To</strong></th>
|
||||
<th width="15%" class="text-center" t-if="has_serial_number">
|
||||
<th>
|
||||
<strong>Quantity</strong>
|
||||
</th>
|
||||
<th t-if="o.picking_type_id.code != 'incoming'" align="left" groups="stock.group_stock_multi_locations">
|
||||
<strong>From</strong>
|
||||
</th>
|
||||
<th t-if="o.picking_type_id.code != 'outgoing'" groups="stock.group_stock_multi_locations">
|
||||
<strong>To</strong>
|
||||
</th>
|
||||
<th class="text-center" t-if="has_serial_number">
|
||||
<strong>Lot/Serial Number</strong>
|
||||
</th>
|
||||
<th width="15%" class="text-center" t-if="has_barcode"><strong>
|
||||
Product Barcode</strong>
|
||||
<th class="text-center" t-if="has_barcode">
|
||||
<strong>Product Barcode</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -101,13 +97,13 @@
|
||||
<span t-field="ml.product_uom_id" groups="uom.group_uom"/>
|
||||
|
||||
</td>
|
||||
<td width="20%" t-if="o.picking_type_id.code != 'incoming'">
|
||||
<td t-if="o.picking_type_id.code != 'incoming'" groups="stock.group_stock_multi_locations">
|
||||
<span t-esc="ml.location_id.display_name"/>
|
||||
<t t-if="ml.package_id">
|
||||
<span t-field="ml.package_id"/>
|
||||
</t>
|
||||
</td>
|
||||
<td t-if="o.picking_type_id.code != 'outgoing'">
|
||||
<td t-if="o.picking_type_id.code != 'outgoing'" groups="stock.group_stock_multi_locations">
|
||||
<div>
|
||||
<span t-field="ml.location_dest_id"/>
|
||||
<t t-if="ml.result_package_id">
|
||||
@@ -115,16 +111,16 @@
|
||||
</t>
|
||||
</div>
|
||||
</td>
|
||||
<td width="15%" class=" text-center h6" t-if="has_serial_number">
|
||||
<img t-if="has_serial_number and (ml.lot_id or ml.lot_name)" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&humanreadable=1' % ('Code128', ml.lot_id.name, 600, 100)" style="width:100%;height:35px;" alt="Barcode"/>
|
||||
<td class=" text-center h6" t-if="has_serial_number">
|
||||
<img t-if="has_serial_number and (ml.lot_id or ml.lot_name)" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&humanreadable=1' % ('Code128', ml.lot_id.name or ml.lot_name, 400, 100)" style="width:100%;height:35px;" alt="Barcode"/>
|
||||
|
||||
</td>
|
||||
<td width="15%" class="text-center" t-if="has_barcode">
|
||||
<td class="text-center" t-if="has_barcode">
|
||||
<t t-if="product_barcode != move.product_id.barcode">
|
||||
<span t-if="move.product_id and move.product_id.barcode">
|
||||
<img t-if="len(move.product_id.barcode) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', move.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
|
||||
<img t-elif="len(move.product_id.barcode) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', move.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
|
||||
<img t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', move.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
|
||||
<img t-if="len(move.product_id.barcode) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&quiet=%s' % ('EAN13', move.product_id.barcode, 400, 100, 0)" style="height:35px" alt="Barcode"/>
|
||||
<img t-elif="len(move.product_id.barcode) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&quiet=%s' % ('EAN8', move.product_id.barcode, 400, 100, 0)" style="height:35px" alt="Barcode"/>
|
||||
<img t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&quiet=%s' % ('Code128', move.product_id.barcode, 400, 100, 0)" style="height:35px" alt="Barcode"/>
|
||||
|
||||
</span>
|
||||
<t t-set="product_barcode" t-value="move.product_id.barcode"/>
|
||||
@@ -135,28 +131,32 @@
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm" t-if="o.package_level_ids and o.picking_type_entire_packs">
|
||||
<table class="table table-sm" t-if="o.package_level_ids and o.picking_type_entire_packs and o.state in ['assigned', 'done']">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25%">Package</th>
|
||||
<th width="25%" class="text-center">Barcode</th>
|
||||
<th width="25%" class="text-left">Source</th>
|
||||
<th width="25%" class="text-right">Destination</th>
|
||||
<th>Package</th>
|
||||
<th t-if="o.picking_type_id.code != 'incoming'" groups="stock.group_stock_multi_locations">From</th>
|
||||
<th t-if="o.picking_type_id.code != 'outgoing'" groups="stock.group_stock_multi_locations">To</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="o.package_level_ids.sorted(key=lambda p: p.package_id.name)" t-as="package">
|
||||
<t t-set="package" t-value="package.with_context(picking_id=o.id)" />
|
||||
<td><span t-field="package.package_id.name"/></td>
|
||||
<td><img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', package.package_id.name, 600, 100)" style="width:300px ;height:50px" alt="Barcode"/></td>
|
||||
<td><span t-field="package.location_id"/></td>
|
||||
<td><span t-field="package.location_dest_id"/></td>
|
||||
<td>
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&humanreadable=1' % ('Code128', package.package_id.name, 600, 100)" style="width:300px;height:50px; margin-left: -50px;" alt="Barcode"/><br/>
|
||||
</td>
|
||||
<td t-if="o.picking_type_id.code != 'incoming'" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="package.location_id"/>
|
||||
</td>
|
||||
<td t-if="o.picking_type_id.code != 'outgoing'" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="package.location_dest_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<t t-set="no_reserved_product" t-value="o.move_lines.filtered(lambda x: x.product_uom_qty != x.reserved_availability and x.move_line_ids and x.state!='done')"/>
|
||||
<p t-if="o.state in ['draft', 'waiting', 'confirmed'] or no_reserved_product"><i class="fa fa-exclamation-triangle" />
|
||||
All products could not be reserved. Click on the "Check Availability" button to try to reserve products
|
||||
All products could not be reserved. Click on the "Check Availability" button to try to reserve products.
|
||||
</p>
|
||||
<p t-field="o.note"/>
|
||||
</div>
|
||||
@@ -170,10 +170,10 @@
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-12">
|
||||
<table class="table table-condensed" style="border-bottom: 0px solid white !important;width: 3in;">
|
||||
<tr>
|
||||
<th style="text-align: left;">
|
||||
<th style="text-align: center;">
|
||||
<span t-field="o.name"/>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user