[FIX]refactor package report

bzr revid: csn@openerp.com-20140317094722-etwze4uvx3wnejfw
This commit is contained in:
Cedric Snauwaert 2014-03-17 10:47:22 +01:00
parent cb17a2dc94
commit 3f6290b8c4
3 changed files with 55 additions and 1 deletions

View File

@ -88,6 +88,7 @@ Dashboard / Reports for Warehouse Management will include:
'report/report_stock_view.xml',
'board_warehouse_view.xml',
'res_config_view.xml',
'views/report_package_barcode.xml',
],
'test': [
'test/inventory.yml',

View File

@ -3,7 +3,7 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list.internal" string="Picking Slip" rml="stock/report/picking_internal.rml"/>
<report id="report_quant_package_barcode" model="stock.quant.package" name="stock.quant.package.barcode" string="Package BarCode" rml="stock/report/package_barcode.rml"/>
<report id="action_report_quant_package_barcode" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode" string="Package BarCode" file="stock.report_package_barcode"/>
<report id="report_picking_list_in" model="stock.pickin" name="stock.picking.list" string="Receipt Slip" rml="stock/report/picking.rml"/>
<report id="report_picking_list_out" model="stock.picking" name="stock.picking.list" string="Delivery Slip" rml="stock/report/picking.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_package_barcode">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t>
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-8">
<table class="table table-condensed" style="border-bottom: 0px solid white !important;">
<thead>
<tr>
<th>Product</th>
<th class="text-right">Quantity</th>
<th>Lot</th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.quant_ids" t-as="l">
<td>
<span t-field="l.product_id.name"/>
</td>
<td class="text-right">
<span t-field="l.qty"/>
<span groups="product.group_uom" t-field="l.product_id.uom_id.name"/>
</td>
<td>
<t t-if="l.lot_id"><span t-field="l.lot_id.name"/></t>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-4">
<img class="image" t-att-src="'data:image/png;base64,%s' % res_company.logo" style="border:auto;"/>
</div>
</div>
<div class="row">
<div class="col-xs-12 mt32">
<table class="table table-condensed" style="border-bottom: 3px solid black !important;"><thead><th> </th></thead></table>
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Standard39', o.name, 800, 40)" style="width:100%;"/>
<p class="text-center" t-field="o.name"></p>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</data>
</openerp>