From b0192abb5fedbd1a3675fb96d6e7845748bdbf48 Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Thu, 23 Feb 2012 14:42:17 +0530 Subject: [PATCH] [Fix] : Fix Label reports bzr revid: sbh@tinyerp.com-20120223091217-573vqlxwprt70ba8 --- .../addons/base/report/corporate_defaults.xml | 2 -- .../addons/base/report/corporate_defaults.xsl | 24 ++++++++-------- .../base/res/report/partner_address.xml | 2 -- .../base/res/report/partner_address.xsl | 28 +++++-------------- 4 files changed, 19 insertions(+), 37 deletions(-) diff --git a/openerp/addons/base/report/corporate_defaults.xml b/openerp/addons/base/report/corporate_defaults.xml index cef5acdd020..88d42d40814 100644 --- a/openerp/addons/base/report/corporate_defaults.xml +++ b/openerp/addons/base/report/corporate_defaults.xml @@ -6,7 +6,6 @@ <name type="field" name="partner_id.name"/> - <address type="zoom" name="partner_id.address"> <street type="field" name="street"/> <zip type="field" name="zip"/> <city type="field" name="city"/> @@ -14,7 +13,6 @@ <country type="field" name="country_id.name"/> <phone type="field" name="phone"/> <email type="field" name="email"/> - </address> </corporation> <user> <name type="field" name="name"/> diff --git a/openerp/addons/base/report/corporate_defaults.xsl b/openerp/addons/base/report/corporate_defaults.xsl index 414071466af..e0f6918ec59 100644 --- a/openerp/addons/base/report/corporate_defaults.xsl +++ b/openerp/addons/base/report/corporate_defaults.xsl @@ -22,18 +22,18 @@ <setFont name="Helvetica" size="10"/> <drawRightString x="20cm" y="28.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString> - <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString> + <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/street"/></drawString> <drawString x="1cm" y="26.5cm"> - <xsl:value-of select="//corporate-header/corporation/address/zip"/> + <xsl:value-of select="//corporate-header/corporation/zip"/> <xsl:text> </xsl:text> - <xsl:value-of select="//corporate-header/corporation/address/city"/> + <xsl:value-of select="//corporate-header/corporation/city"/> <xsl:text> - </xsl:text> - <xsl:value-of select="//corporate-header/corporation/address/country"/> + <xsl:value-of select="//corporate-header/corporation/country"/> </drawString> <drawString x="1cm" y="26cm">Phone:</drawString> - <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString> + <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/phone"/></drawRightString> <drawString x="1cm" y="25.5cm">Mail:</drawString> - <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString> + <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/email"/></drawRightString> <!--page bottom--> @@ -57,18 +57,18 @@ <setFont name="Helvetica" size="10"/> <drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString> - <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString> + <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/street"/></drawString> <drawString x="1cm" y="26.5cm"> - <xsl:value-of select="//corporate-header/corporation/address/zip"/> + <xsl:value-of select="//corporate-header/corporation/zip"/> <xsl:text> </xsl:text> - <xsl:value-of select="//corporate-header/corporation/address/city"/> + <xsl:value-of select="//corporate-header/corporation/city"/> <xsl:text> - </xsl:text> - <xsl:value-of select="//corporate-header/corporation/address/country"/> + <xsl:value-of select="//corporate-header/corporation/country"/> </drawString> <drawString x="1cm" y="26cm">Phone:</drawString> - <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString> + <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/phone"/></drawRightString> <drawString x="1cm" y="25.5cm">Mail:</drawString> - <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString> + <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/email"/></drawRightString> <!--page bottom--> diff --git a/openerp/addons/base/res/report/partner_address.xml b/openerp/addons/base/res/report/partner_address.xml index 2a413f4e3c6..706e5fbd6fe 100644 --- a/openerp/addons/base/res/report/partner_address.xml +++ b/openerp/addons/base/res/report/partner_address.xml @@ -3,7 +3,6 @@ <address type="fields" name="id"> <company-title type="field" name="title.name"/> <company-name type="field" name="name"/> - <contact type="zoom" name="address"> <type type="field" name="type"/> <title type="field" name="title.name"/> <name type="field" name="name"/> @@ -13,6 +12,5 @@ <city type="field" name="city"/> <state type="field" name="state_id.name"/> <country type="field" name="country_id.name"/> - </contact> </address> </addresses> diff --git a/openerp/addons/base/res/report/partner_address.xsl b/openerp/addons/base/res/report/partner_address.xsl index 01fcc120c23..bbf069605e8 100644 --- a/openerp/addons/base/res/report/partner_address.xsl +++ b/openerp/addons/base/res/report/partner_address.xsl @@ -58,31 +58,17 @@ <xsl:template match="address" mode="story"> <para style="nospace"><xsl:value-of select="company-name"/><xsl:text> </xsl:text><xsl:value-of select="company-title"/></para> - <xsl:choose> - <xsl:when test="count(contact[type='default']) >= 1"> - <!-- apply the first 'contact' node with the type 'default' --> - <xsl:apply-templates select="contact[type='default'][1]"/> - </xsl:when> - <xsl:when test="count(contact[type='']) >= 1"> - <!-- apply the first 'contact' node with an empty type --> - <xsl:apply-templates select="contact[type=''][1]"/> - </xsl:when> - <xsl:otherwise> - <!-- apply the first 'contact' node --> - <xsl:apply-templates select="contact[1]"/> - </xsl:otherwise> - </xsl:choose> - <xsl:if test="position() < last()"> - <nextFrame/> - </xsl:if> - </xsl:template> - - <xsl:template match="contact"> - <para style="nospace"><xsl:value-of select="title"/><xsl:text> </xsl:text><xsl:value-of select="name"/></para> <para style="nospace"><xsl:value-of select="street"/></para> <para style="nospace"><xsl:value-of select="street2"/></para> <para style="nospace"><xsl:value-of select="zip"/><xsl:text> </xsl:text><xsl:value-of select="city"/></para> <para style="nospace"><xsl:value-of select="state"/></para> <para style="nospace"><xsl:value-of select="country"/></para> + <xsl:if test="position() < last()"> + <nextFrame/> + </xsl:if> + </xsl:template> + + <xsl:template match="contact"> + </xsl:template> </xsl:stylesheet>