[IMP]:stock:Stock Inventory Report.

* set header = internal
 * pdf title

bzr revid: apa@tinyerp.com-20101110102611-o3vxr1mbvfszldfn
This commit is contained in:
apa-tiny 2010-11-10 15:56:11 +05:30
parent ba4718a891
commit cee9b4bc8a
3 changed files with 19 additions and 23 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Stock Inventory" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<document filename="Stock Inventory.pdf">
<template pageSize="(595.0,842.0)" title="Stock Inventory" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
</pageTemplate>
@ -59,8 +59,8 @@
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
@ -111,13 +111,6 @@
<para style="terp_header_Centre">Stock Inventory</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="539.0" style="Table5">
<tr>
@ -167,11 +160,8 @@
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_9">[[ repeatIn(o.inventory_line_id, 'p') ]]</para>
<para style="terp_default_2">[[ repeatIn(o.inventory_line_id, 'p') ]]</para>
<blockTable colWidths="70.0,105.0,255.0,109.0" style="Table8">
<tr>
<td>
@ -189,13 +179,18 @@
</tr>
</blockTable>
</section>
<blockTable colWidths="430.0,109.0" style="Table7">
<blockTable colWidths="383.0,47.0,109.0" style="Table7">
<tr>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Bold_Right_9">[[ format(qty_total(o.inventory_line_id)['quantity']) ]] [[ format(qty_total(o.inventory_line_id)['uom']) ]]</para>
<para style="terp_default_Bold_Right_9">[[ formatLang(qty_total(o.inventory_line_id)['quantity'] ,digits=get_digits(dp='Product UoM')) ]] [[ qty_total(o.inventory_line_id)['uom'] ]]</para>
</td>
</tr>
</blockTable>
@ -203,4 +198,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -29,18 +29,19 @@ class stock_inventory_move(report_sxw.rml_parse):
'time': time,
'qty_total':self._qty_total
})
def _qty_total(self,objects):
total = 0.0
uom = objects[0].product_uom.name
for obj in objects:
total += obj.product_qty
return {'quantity':str(total),'uom':uom}
return {'quantity':total,'uom':uom}
report_sxw.report_sxw(
'report.stock.inventory.move',
'stock.inventory',
'addons/stock/report/stock_inventory_move.rml',
parser=stock_inventory_move
parser=stock_inventory_move,
header='internal'
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,6 +6,6 @@
<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"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Inventory Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report id="report_location_overview_all" model="stock.location" name="lot.stock.overview_all" string="Location Content" rml="stock/report/lot_overview_all.rml"/>
<report id="report_stock_inventory_move" model="stock.inventory" name="stock.inventory.move" string="Inventory" rml="stock/report/stock_inventory_move.rml"/>
<report id="report_stock_inventory_move" model="stock.inventory" name="stock.inventory.move" string="Stock Inventory" rml="stock/report/stock_inventory_move.rml"/>
</data>
</openerp>