[FIX] stock: picking report for picking without lines

Even it is dummy, this is possible to create an empty picking,
and to print it.
We therefore must ensure no traceback is displayed.
This commit is contained in:
Denis Ledoux 2015-02-23 11:58:48 +01:00
parent 4f60549a26
commit 5d9fb7f1d1
1 changed files with 2 additions and 2 deletions

View File

@ -27,12 +27,12 @@
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-if="o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
<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-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
</div>
<div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
<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-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>