[REM] Remove old lot move label on stock move
bzr revid: jco@openerp.com-20140317160757-al5m9vz4atw4wrnb
This commit is contained in:
parent
48740872f1
commit
b6f8039880
|
@ -69,7 +69,7 @@ Dashboard / Reports for Warehouse Management will include:
|
|||
],
|
||||
'data': [
|
||||
'security/stock_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/ir.model.access.csv',
|
||||
'stock_data.xml',
|
||||
'stock_data.yml',
|
||||
'wizard/stock_move_view.xml',
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<lots>
|
||||
<lot-line type="fields" name="id">
|
||||
<code type="field" name="product_id.code"/>
|
||||
<product type="field" name="product_id.name"/>
|
||||
<variant type="field" name="product_id.variants"/>
|
||||
<uom type="field" name="product_uom.name"/>
|
||||
<quantity type="field" name="product_uom_qty"/>
|
||||
</lot-line>
|
||||
</lots>
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:variable name="initial_bottom_pos">24.5</xsl:variable>
|
||||
<xsl:variable name="initial_left_pos">1</xsl:variable>
|
||||
<xsl:variable name="height_increment">3.8</xsl:variable>
|
||||
<xsl:variable name="width_increment">7</xsl:variable>
|
||||
<xsl:variable name="frame_height">3.5cm</xsl:variable>
|
||||
<xsl:variable name="frame_width">6.5cm</xsl:variable>
|
||||
<xsl:variable name="number_columns">3</xsl:variable>
|
||||
<xsl:variable name="max_frames">21</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="lots"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lots">
|
||||
<document>
|
||||
<template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Address list" author="Generated by Open ERP">
|
||||
<pageTemplate id="all">
|
||||
<pageGraphics/>
|
||||
<xsl:apply-templates select="lot-line" mode="frames"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<paraStyle name="nospace" fontName="Courier" fontSize="10" spaceBefore="0" spaceAfter="0"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<xsl:apply-templates select="lot-line" mode="story"/>
|
||||
</story>
|
||||
</document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lot-line" mode="frames">
|
||||
<xsl:if test="position() < $max_frames + 1">
|
||||
<frame>
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="$frame_width"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="$frame_height"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="x1">
|
||||
<xsl:value-of select="$initial_left_pos + ((position()-1) mod $number_columns) * $width_increment"/>
|
||||
<xsl:text>cm</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y1">
|
||||
<xsl:value-of select="$initial_bottom_pos - floor((position()-1) div $number_columns) * $height_increment"/>
|
||||
<xsl:text>cm</xsl:text>
|
||||
</xsl:attribute>
|
||||
</frame>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lot-line" mode="story">
|
||||
<para style="nospace"><xsl:value-of select="code"/><xsl:text>, </xsl:text><xsl:value-of select="quantity"/><xsl:text> </xsl:text><xsl:value-of select="uom"/></para>
|
||||
<para style="nospace"><xsl:value-of select="product"/><xsl:text> </xsl:text><xsl:value-of select="variant"/></para>
|
||||
<nextFrame/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -1,85 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import openerp
|
||||
from openerp.report.interface import report_rml
|
||||
from openerp.report.interface import toxml
|
||||
|
||||
#FIXME: we should use toxml
|
||||
|
||||
class report_custom(report_rml):
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
config = """
|
||||
<config>
|
||||
<date>09/09/2005</date>
|
||||
<PageSize>210.00mm,297.00mm</PageSize>
|
||||
<PageWidth>595.27</PageWidth>
|
||||
<PageHeight>841.88</PageHeight>
|
||||
<tableSize>60.00mm,60.00mm,60.00mm</tableSize>
|
||||
<report-header>Stock by location</report-header>
|
||||
<report-footer>Generated by OpenERP</report-footer>
|
||||
</config>
|
||||
"""
|
||||
header = """
|
||||
<header>
|
||||
<field>Location</field>
|
||||
<field>Product name</field>
|
||||
<field>Product quantity</field>
|
||||
</header>
|
||||
"""
|
||||
|
||||
def process(location_id, level):
|
||||
registry = openerp.registry(cr.dbname)
|
||||
xml = '<row>'
|
||||
location_name = registry['stock.location'].read(cr, uid, [location_id], ['name'])
|
||||
xml += "<col para='yes' tree='yes' space='" + str(3*level) + "mm'>"
|
||||
xml += location_name[0]['name'] + '</col>'
|
||||
|
||||
prod_info = registry['stock.location']._product_get(cr, uid, location_id)
|
||||
xml += "<col>"
|
||||
for prod_id in prod_info.keys():
|
||||
if prod_info[prod_id] != 0.0:
|
||||
prod_name = registry['product.product'].read(cr, uid, [prod_id], ['name'])
|
||||
xml += prod_name[0]['name'] + '\n'
|
||||
xml += '</col>'
|
||||
|
||||
xml += "<col>"
|
||||
for prod_id in prod_info.keys():
|
||||
if prod_info[prod_id] != 0.0:
|
||||
xml += str(prod_info[prod_id]) + '\n'
|
||||
xml += '</col></row>'
|
||||
|
||||
location_child = registry['stock.location'].read(cr, uid, [location_id], ['child_ids'])
|
||||
for child_id in location_child[0]['child_ids']:
|
||||
xml += process(child_id, level+1)
|
||||
return xml
|
||||
|
||||
for location_id in ids:
|
||||
xml = '<lines>' + process(location_id, 0) + '</lines>'
|
||||
|
||||
xml = '<?xml version="1.0" ?>' '<report>'+ config + header + xml + '</report>'
|
||||
|
||||
return self.post_process_xml_data(cr, uid, xml, context)
|
||||
|
||||
report_custom('report.stock.lot.location', 'stock.location', '', 'addons/stock/report/stock_by_location.xsl')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:variable name="page_format">a4_normal</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- stylesheet -->
|
||||
|
||||
<xsl:template name="stylesheet">
|
||||
<paraStyle name="title" fontName="Helvetica-Bold" fontSize="22" alignment="center"/>
|
||||
|
||||
<blockTableStyle id="header">
|
||||
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="lines">
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="story">
|
||||
<xsl:apply-templates select="report"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="report">
|
||||
<xsl:apply-templates select="config"/>
|
||||
<blockTable style="header">
|
||||
<xsl:attribute name="colWidths">
|
||||
<xsl:value-of select="./config/tableSize"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:apply-templates select="header"/>
|
||||
</blockTable>
|
||||
<xsl:apply-templates select="lines"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="config">
|
||||
<para style="title">
|
||||
<xsl:value-of select="report-header"/>
|
||||
</para>
|
||||
<spacer length="1cm" width="2mm"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="header">
|
||||
<tr>
|
||||
<xsl:for-each select="field">
|
||||
<td>
|
||||
<para>
|
||||
<xsl:value-of select="."/>
|
||||
</para>
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lines">
|
||||
<blockTable style="lines">
|
||||
<xsl:attribute name="colWidths">
|
||||
<xsl:value-of select="../config/tableSize"/>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="row"/>
|
||||
</blockTable>
|
||||
<spacer length="2mm" width="2mm"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="row">
|
||||
<tr>
|
||||
<xsl:apply-templates select="col"/>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="col">
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@para='yes'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@tree='yes'">
|
||||
<para>
|
||||
<xsl:attribute name="leftIndent"><xsl:value-of select="@space"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</para>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<para>
|
||||
<xsl:value-of select="."/>
|
||||
</para>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xpre>
|
||||
<xsl:value-of select="."/>
|
||||
</xpre>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -20,6 +20,5 @@
|
|||
/>
|
||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
|
||||
<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="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"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -585,11 +585,7 @@
|
|||
<menuitem action="action_location_form" id="menu_action_location_form" groups="stock.group_locations"
|
||||
parent="menu_stock_configuration" sequence="5"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_product_location_tree">
|
||||
<field name="context">{'product_id': active_id}</field>
|
||||
<field name="name">Stock by Location</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
</record>
|
||||
|
||||
<record id="act_product_stock_move_open" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_done': 1,'search_default_product_id': active_id, 'default_product_id': active_id}</field>
|
||||
<field name="name">Moves</field>
|
||||
|
|
Loading…
Reference in New Issue