[ADD] stock,delivery: delivery slip for pickings
This commit is contained in:
committed by
Richard Mathot
parent
53f138fc41
commit
c505f00c3e
@@ -21,6 +21,8 @@ invoices from picking, the system is able to add and compute the shipping line.
|
||||
'partner_view.xml',
|
||||
'delivery_data.xml',
|
||||
'views/report_shipping.xml',
|
||||
'views/report_deliveryslip.xml'
|
||||
|
||||
],
|
||||
'demo': ['delivery_demo.xml'],
|
||||
'test': [
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<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'"><strong>Carrier</strong></th>
|
||||
<th><strong>Weight</strong></th>
|
||||
</xpath>
|
||||
<xpath expr="//td[@name='td_sched_date']" position="after">
|
||||
<td t-if="o.picking_type_id.code == 'outgoing'">
|
||||
<span t-field="o.carrier_id"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.weight"/>
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -71,6 +71,7 @@ Dashboard / Reports for Inventory Management will include:
|
||||
'views/report_lot_barcode.xml',
|
||||
'views/report_location_barcode.xml',
|
||||
'views/report_stockpicking_operations.xml',
|
||||
'views/report_deliveryslip.xml',
|
||||
'views/report_stockinventory.xml',
|
||||
'report/report_stock_forecast.xml',
|
||||
'stock_dashboard.xml',
|
||||
|
||||
@@ -9,7 +9,15 @@
|
||||
name="stock.report_picking"
|
||||
file="stock.report_picking_operations"
|
||||
/>
|
||||
<report
|
||||
<report
|
||||
string="Delivery Slip"
|
||||
id="action_report_delivery"
|
||||
model="stock.picking"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_deliveryslip"
|
||||
file="stock.report_deliveryslip"
|
||||
/>
|
||||
<report
|
||||
string="Inventory"
|
||||
id="action_report_inventory"
|
||||
model="stock.inventory"
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_delivery_document">
|
||||
<t t-call="report.html_container">
|
||||
<t t-call="report.external_layout">
|
||||
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div>
|
||||
<span><strong>Customer Address:</strong></span>
|
||||
</div>
|
||||
<div t-if="o.partner_id" name="partner_header">
|
||||
<div t-field="o.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-5 col-xs-offset-1">
|
||||
<div>
|
||||
<span><strong>Contact Address:</strong></span>
|
||||
</div>
|
||||
<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">
|
||||
<div>
|
||||
<div t-field="o.move_lines[0].partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
|
||||
</div>
|
||||
</div>
|
||||
<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) or o.move_lines and not o.move_lines[0].partner_id">
|
||||
<div t-field="o.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<span t-field="o.name"/>
|
||||
</h2>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Order (Origin)</strong></th>
|
||||
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="o.picking_type_id"/>
|
||||
</td>
|
||||
<td name="td_sched_date">
|
||||
<span t-field="o.min_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-condensed mt48" t-if="not o.pack_operation_ids">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th><strong>Status</strong></th>
|
||||
<th><strong>Location</strong></th>
|
||||
<th class="text-right"><strong>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.state"/></td>
|
||||
<td><span t-field="move.location_id"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="move.product_uom_qty"/>
|
||||
<span t-field="move.product_uom"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-condensed mt48" t-if="o.pack_operation_ids">
|
||||
<t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('lot_id')" groups="stock.group_production_lot"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th t-if="has_serial_number"><strong>Serial Number</strong></th>
|
||||
<th><strong>Status</strong></th>
|
||||
<th><strong>Location</strong></th>
|
||||
<th class="text-right"><strong>Quantity</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="o.pack_operation_ids" t-as="pack_operation">
|
||||
<td>
|
||||
<span t-field="pack_operation.product_id"/>
|
||||
<t t-if="not pack_operation.product_id and pack_operation.package_id">
|
||||
<span t-field="pack_operation.package_id"/>
|
||||
</t>
|
||||
</td>
|
||||
<t t-if="has_serial_number">
|
||||
<td t-if="pack_operation.lot_id">
|
||||
<span t-field="pack_operation.lot_id"/>
|
||||
</td>
|
||||
<td t-if="not pack_operation.lot_id"/>
|
||||
</t>
|
||||
<td>
|
||||
<span t-field="pack_operation.picking_id.move_lines[pack_operation_index].state"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="pack_operation.location_id"/>
|
||||
<span t-if="pack_operation.package_id">:</span>
|
||||
<span t-field="pack_operation.package_id"/>
|
||||
<span t-if="pack_operation.lot_id">:</span>
|
||||
<span t-field="pack_operation.lot_id"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="pack_operation.product_qty"/>
|
||||
<span t-field="pack_operation.product_uom_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user