flectra/addons/stock/report/report_deliveryslip.xml

152 lines
8.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
2018-01-16 11:34:37 +01:00
<flectra>
<template id="report_delivery_document">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
<div class="page">
<div class="row" name="customer_address">
<div class="col-xs-4 pull-right">
<div>
<span><strong>Customer Address:</strong></span>
</div>
<div t-if="o.move_lines and o.move_lines[0].partner_id" name="partner_header">
<div t-field="o.move_lines[0].partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
</div>
<div t-if="not (o.move_lines and o.move_lines[0].partner_id) and o.partner_id" name="partner_header">
<div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
</div>
</div>
</div>
<h2>
<span t-field="o.name"/>
</h2>
<table class="table table-condensed">
<thead>
<tr>
<th t-if="o.origin"><strong>Order (Origin)</strong></th>
<th name="td_sched_date_h">
<strong>Date</strong>
</th>
2018-01-23 07:40:28 +01:00
<th t-if="o.branch_id" groups="base_branch_company.group_multi_branch"><strong>Branch</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>
2018-01-23 07:40:28 +01:00
<td t-if="o.branch_id" groups="base_branch_company.group_multi_branch">
<span t-field="o.branch_id"/>
</td>
</tr>
</tbody>
</table>
<table class="table table-condensed mt48" t-if="not o.move_line_ids">
<thead>
<tr>
<th><strong>Product</strong></th>
<th><strong>Ordered Quantity</strong></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.move_lines" t-as="move">
<td><span t-field="move.product_id"/></td>
<td>
<span t-field="move.ordered_qty"/>
<span t-field="move.product_uom"/>
</td>
</tr>
</tbody>
</table>
<t t-set="backorder" t-value="False"/>
<table class="table table-condensed mt48" t-if="o.move_line_ids">
<t t-set="has_serial_number" t-value="o.move_line_ids.mapped('lot_id')" groups="stock.group_production_lot"/>
<thead>
<tr>
<th><strong>Product</strong></th>
<th name="lot_serial" t-if="has_serial_number">
Lot/Serial Number
</th>
<th class="text-center"><strong>Ordered Quantity</strong></th>
<th t-if="any([move_line.state == 'done' for move_line in o.move_line_ids])" class="text-right">
<strong>Delivered Quantity</strong>
</th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.move_line_ids" t-as="move_line">
<td>
<span t-field="move_line.product_id"/>
<p t-if="o.picking_type_code == 'outgoing'">
<span t-field="move_line.product_id.sudo().description_pickingout"/>
</p>
<p t-if="o.picking_type_code == 'incoming'">
<span t-field="move_line.product_id.sudo().description_pickingin"/>
</p>
</td>
<t t-if="has_serial_number">
<td>
<table width="100%">
<tr>
<td>
<span t-field="move_line.lot_id"/>
<t t-if="not move_line.lot_id">
<span t-field="move_line.lot_name"/>
</t>
</td>
<td name="lot_qty">
<t t-if="move_line.product_qty">
<span t-field="move_line.product_qty"/>
</t>
</td>
</tr>
</table>
</td>
</t>
<td class="text-center">
<span t-field="move_line.ordered_qty"/>
<span t-field="move_line.product_uom_id"/>
</td>
<td class="text-right" t-if="move_line.state == 'done'">
<t t-if="move_line.ordered_qty != move_line.qty_done">
<t t-set="backorder" t-value="True"/>
</t>
<span t-field="move_line.qty_done"/>
<span t-field="move_line.product_uom_id"/>
</td>
</tr>
</tbody>
</table>
<p t-if="o.backorder_id">
This shipment is a backorder of <t t-esc="o.backorder_id.name"/>.
</p>
<p>
<t t-if="backorder">
All items couldn't be shipped, the remaining ones will be shipped as soon as they become available.
</t>
</p>
</div>
</t>
</t>
</template>
<template id="report_deliveryslip">
<t t-foreach="docs" t-as="o">
<t t-call="stock.report_delivery_document" t-lang="o.partner_id.lang"/>
</t>
</template>
2018-01-16 11:34:37 +01:00
</flectra>