~jgrandguillaume-c2c/openobject-addons/multi-company-cost-price

« back to all changes in this revision

Viewing changes to account/report/rml_parse.py

  • Committer: Joël Grand-Guillaume
  • Date: 2010-04-08 09:00:10 UTC
  • mfrom: (2533.3.664)
  • Revision ID: joel.grandguillaume@camptocamp.com-20100408090010-c0pqjan341s18bxs
[MRG] Merge from last trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
##############################################################################
3
 
#    
 
3
#
4
4
#    OpenERP, Open Source Management Solution
5
5
#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6
6
#
15
15
#    GNU Affero General Public License for more details.
16
16
#
17
17
#    You should have received a copy of the GNU Affero General Public License
18
 
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
 
18
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
#
20
20
##############################################################################
21
21
 
150
150
            return str.encode("ascii")
151
151
 
152
152
        else:
153
 
            print Stringer
154
153
            return Stringer
155
154
 
 
155
    def _add_header(self, node, header=1):
 
156
        if self.name == 'account.account.balance.landscape':
 
157
            if header==2:
 
158
                rml_head =  self.rml_header2
 
159
            else:
 
160
                rml_head =  self.rml_header
 
161
            rml_head =  rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
 
162
        else:
 
163
            return super(rml_parse, self)._add_header(node, header)
 
164
        return True
156
165
 
157
166
    # def _add_header(self, node):
158
167
    #   rml_head = tools.file_open('specific_param/report/header/corporate_rml_header_ch.rml').read()