769eafb483
Flectra is Forked from Odoo v11 commit : (6135e82d73
)
187 lines
13 KiB
XML
187 lines
13 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<template id="report_picking">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="web.external_layout">
|
|
<div class="page">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
|
|
<span><strong>Delivery Address:</strong></span>
|
|
<div t-field="o.move_lines[0].partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
|
</div>
|
|
<div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines or not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
|
|
<span><strong>Warehouse Address:</strong></span>
|
|
<div t-field="o.picking_type_id.warehouse_id.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-5 col-xs-offset-1">
|
|
<div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
|
|
<span><strong>Partner Address:</strong></span>
|
|
</div>
|
|
<div t-if="o.picking_type_id.code=='internal' and o.partner_id">
|
|
<span><strong>Warehouse Address:</strong></span>
|
|
</div>
|
|
<div t-if="o.picking_type_id.code=='outgoing' and o.partner_id">
|
|
<span><strong>Customer Address:</strong></span>
|
|
</div>
|
|
<div t-if="o.partner_id" name="partner_header">
|
|
<div t-field="o.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
|
<p t-if="o.sudo().partner_id.vat"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.sudo().partner_id.vat"/></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<img
|
|
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)"
|
|
style="width:300px;height:50px" class="pull-right mb16"
|
|
/>
|
|
<h1 t-field="o.name" class="mt0 pull-left"/>
|
|
<div class="clearfix"/>
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th t-if="o.origin"><strong>Order (Origin)</strong></th>
|
|
<th><strong>State</strong></th>
|
|
<th><strong>Commitment Date</strong></th>
|
|
<th name="td_sched_date_h"><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>
|
|
<span t-field="o.date"/>
|
|
</td>
|
|
<td name="td_sched_date">
|
|
<span t-field="o.scheduled_date"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br/>
|
|
<br/>
|
|
<table class="table table-condensed" t-if="o.move_line_ids">
|
|
<t t-set="has_barcode" t-value="any([move_lines.product_id and move_lines.product_id.sudo().barcode or move_lines.package_id for move_lines 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 width="15%">Product</th>
|
|
<th width="10%">Quantity</th>
|
|
<th width="20%" class="text-center">
|
|
<t t-if="has_barcode">Barcode</t>
|
|
</th>
|
|
<th width="15%">
|
|
<t t-if="o.picking_type_id.code != 'incoming'" align="left">Source</t>
|
|
</th>
|
|
<th width="20%">
|
|
<t t-if="has_serial_number">Lot/Serial Number</t>
|
|
</th>
|
|
<th width="20%" class="text-right">Destination</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-foreach="o.move_lines.sorted(key=lambda m: m.product_id.id)" t-as="move">
|
|
<td>
|
|
<span t-field="move.product_id.display_name"/><br/>
|
|
<span t-field="move.product_id.description_picking"/>
|
|
</td>
|
|
<td>
|
|
<span t-if="move.product_qty" t-esc="move.product_qty"/>
|
|
<span t-if="not move.product_qty" t-esc="move.product_uom._compute_quantity(move.quantity_done, move.product_id.uom_id, rounding_method='HALF-UP')"/>
|
|
<span t-field="move.product_id.uom_id" groups="product.group_uom"/>
|
|
</td>
|
|
<td>
|
|
<t t-if="has_barcode">
|
|
<span t-if="move.product_id and move.product_id.barcode">
|
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', move.product_id.barcode, 600, 100)" style="width:100%;height:50px"/>
|
|
</span>
|
|
</t>
|
|
</td>
|
|
<td colspan="3">
|
|
<t t-if="move.move_line_ids">
|
|
<table width="100%">
|
|
<tr t-foreach="move.move_line_ids.sorted(key=lambda ml: ml.location_id.id)" t-as="ml">
|
|
<td width="20%">
|
|
<t t-if="o.picking_type_id.code != 'incoming'">
|
|
<span t-esc="ml.location_id.display_name"/>
|
|
<t t-if="ml.package_id">
|
|
- <span t-field="ml.package_id"/>
|
|
</t>
|
|
</t>
|
|
</td>
|
|
<td width="50%">
|
|
<t t-if="has_serial_number and ml.product_id.tracking != 'none'">
|
|
<div class="col-xs-4">
|
|
<span t-field="ml.lot_id"/>
|
|
<span t-if="not ml.lot_id" t-field="ml.lot_name"/>
|
|
</div>
|
|
<div class="col-xs-8">
|
|
<span t-field="ml.qty_done"/>
|
|
<t t-if="o.state!='done'">
|
|
/ <span t-field="ml.product_uom_qty"/>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</td>
|
|
<td width="30%" align="right">
|
|
<div>
|
|
<span t-field="ml.location_dest_id"/>
|
|
<t t-if="ml.result_package_id">
|
|
- <span t-field="ml.result_package_id"/>
|
|
</t>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</t>
|
|
<t t-else="">
|
|
<span>No reservation or quantity done yet.</span>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table class="table table-condensed" t-if="o.entire_package_ids and o.picking_type_entire_packs">
|
|
<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>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-foreach="o.entire_package_ids.sorted(key=lambda p: p.name)" t-as="package">
|
|
<t t-set="package" t-value="package.with_context({'picking_id':o.id})" />
|
|
<td><span t-field="package.name"/></td>
|
|
<td><img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', package.name, 600, 100)" style="width:300px ;height:50px"/></td>
|
|
<td><span t-field="package.current_source_location_id"/></td>
|
|
<td><span t-field="package.current_destination_location_id"/></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p t-if="o.state in ['draft', 'waiting', 'confirmed']">
|
|
You do not have any products reserved for this picking. Please click the 'Reserve' button
|
|
to check if products are available.
|
|
</p>
|
|
<p t-field="o.note"/>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</odoo>
|