154 lines
11 KiB
XML
154 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="external_layout_barcode_right" inherit_id="report.external_layout" primary="True">
|
|
<xpath expr="//t[@t-call='report.external_layout_header']" position="attributes">
|
|
<attribute name="t-call">stock.external_layout_header_barcode_right</attribute>
|
|
</xpath>
|
|
</template>
|
|
<template id="external_layout_header_barcode_right" inherit_id="report.external_layout_header" primary="True">
|
|
<xpath expr="//div[@name='company_address']" position="after">
|
|
<div class="col-xs-4 pull-right mt8" name="right_box">
|
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="report_picking">
|
|
<t t-call="report.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="stock.external_layout_barcode_right">
|
|
<div class="page">
|
|
<br/>
|
|
<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", "fax"], "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", "fax"], "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>Vendor 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">VAT: <span t-field="o.sudo().partner_id.vat"/></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<h1 t-field="o.name" class="mt0"/>
|
|
<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.min_date"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br/>
|
|
<br/>
|
|
<table class="table table-condensed" t-if="o.pack_operation_ids">
|
|
<t t-set="has_barcode" t-value="any([pack_operation.product_id and pack_operation.product_id.sudo().barcode or pack_operation.package_id for pack_operation in o.pack_operation_ids])"/>
|
|
<t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('pack_lot_ids')" groups="stock.group_production_lot"/>
|
|
<thead>
|
|
<tr>
|
|
<th><strong>Product</strong></th>
|
|
<th class="text-right"><strong>Quantity</strong></th>
|
|
<t t-if="o.picking_type_id.code != 'incoming'"><th><strong>Source</strong></th></t>
|
|
<th t-if="has_barcode" class="text-center">
|
|
<strong>Barcode</strong>
|
|
</th>
|
|
<th t-if="has_serial_number">
|
|
<strong>Lot/Serial Number</strong>
|
|
</th>
|
|
<t t-if="o.picking_type_id.code != 'outgoing'"><th><strong>Destination</strong></th></t>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-set="pack_operation_ids" t-value="o.pack_operation_ids"/>
|
|
<t groups="base.group_portal" t-set="pack_operation_ids" t-value="o.pack_operation_ids.sudo()"/>
|
|
<tr t-foreach="pack_operation_ids" t-as="pack_operation">
|
|
<td><span t-field="pack_operation.product_id"/><br/>
|
|
<span t-field="pack_operation.product_id.description_picking"/>
|
|
<t t-if="not pack_operation.product_id and pack_operation.package_id"><span t-field="pack_operation.package_id"/></t></td>
|
|
<td class="text-right"><span t-field="pack_operation.product_qty"/> <span t-field="pack_operation.product_uom_id" groups="product.group_uom"/></td>
|
|
<t t-if="o.picking_type_id.code != 'incoming'"><td><span t-field="pack_operation.location_id"/>
|
|
<span t-if="pack_operation.package_id">:</span>
|
|
<span t-field="pack_operation.package_id"/>
|
|
</td>
|
|
</t>
|
|
<td t-if="has_barcode">
|
|
<span t-if="pack_operation.product_id and pack_operation.product_id.barcode">
|
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', pack_operation.product_id.barcode, 600, 100)" style="width:300px;height:50px"/>
|
|
</span>
|
|
<span t-if="pack_operation.package_id and not pack_operation.product_id">
|
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', pack_operation.package_id.name, 600, 100)" style="width:300px;height:50px"/>
|
|
</span>
|
|
</td>
|
|
<td t-if="has_serial_number">
|
|
<table class="table table-condensed" t-if="pack_operation.pack_lot_ids">
|
|
<tr t-foreach="pack_operation.pack_lot_ids" t-as="packlot">
|
|
<td>
|
|
<span t-field="packlot.lot_id"/>
|
|
<t t-if="not packlot.lot_id">
|
|
<span t-field="packlot.lot_name"/>
|
|
</t>
|
|
</td>
|
|
<td>
|
|
<span t-field="packlot.qty"/> <t t-if="o.picking_type_id.use_existing_lots and o.state!='done'"> / <span t-field="packlot.qty_todo"/></t>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<t t-if="o.picking_type_id.code != 'outgoing'"><td><span t-field="pack_operation.location_dest_id"/>
|
|
<span t-if="pack_operation.result_package_id">:</span>
|
|
<span t-field="pack_operation.result_package_id"/>
|
|
</td></t>
|
|
</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>
|