[REF] openerp.report: fix weird indentation, not multiple of four.
bzr revid: florent.xicluna@gmail.com-20120208170456-ak1ykpy6yel71ylc
This commit is contained in:
parent
9621008df1
commit
7675d45c2c
|
@ -181,7 +181,7 @@ class report_rml(report_int):
|
||||||
|
|
||||||
def create_pdf(self, rml, localcontext = None, logo=None, title=None):
|
def create_pdf(self, rml, localcontext = None, logo=None, title=None):
|
||||||
if not localcontext:
|
if not localcontext:
|
||||||
localcontext={}
|
localcontext = {}
|
||||||
localcontext.update({'internal_header':self.internal_header})
|
localcontext.update({'internal_header':self.internal_header})
|
||||||
if logo:
|
if logo:
|
||||||
self.bin_datas['logo'] = logo
|
self.bin_datas['logo'] = logo
|
||||||
|
|
|
@ -228,7 +228,7 @@ class document(object):
|
||||||
if not isinstance(datas[atr['value']], (str, unicode)):
|
if not isinstance(datas[atr['value']], (str, unicode)):
|
||||||
txt = str(datas[atr['value']])
|
txt = str(datas[atr['value']])
|
||||||
else:
|
else:
|
||||||
txt = datas[atr['value']]
|
txt = datas[atr['value']]
|
||||||
el.text = txt
|
el.text = txt
|
||||||
else:
|
else:
|
||||||
for el_cld in node:
|
for el_cld in node:
|
||||||
|
|
|
@ -120,7 +120,7 @@ class report_printscreen_list(report_int):
|
||||||
line[f]=round(line[f],precision)
|
line[f]=round(line[f],precision)
|
||||||
col = etree.SubElement(node_line, 'col', tree='no')
|
col = etree.SubElement(node_line, 'col', tree='no')
|
||||||
if line[f] != None:
|
if line[f] != None:
|
||||||
col.text = tools.ustr(line[f] or '')
|
col.text = tools.ustr(line[f] or '')
|
||||||
else:
|
else:
|
||||||
col.text = '/'
|
col.text = '/'
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ class _rml_stylesheet(object):
|
||||||
attr = {}
|
attr = {}
|
||||||
attrs = ps.attrib
|
attrs = ps.attrib
|
||||||
for key, val in attrs.items():
|
for key, val in attrs.items():
|
||||||
attr[key] = val
|
attr[key] = val
|
||||||
attrs = []
|
attrs = []
|
||||||
for a in attr:
|
for a in attr:
|
||||||
if a in self._tags:
|
if a in self._tags:
|
||||||
|
@ -296,13 +296,13 @@ class _rml_template(object):
|
||||||
frames[(posy,posx,tmpl.get('id'))] = _rml_tmpl_frame(posx, utils.unit_get(tmpl.get('width')))
|
frames[(posy,posx,tmpl.get('id'))] = _rml_tmpl_frame(posx, utils.unit_get(tmpl.get('width')))
|
||||||
for tmpl in pt.findall('pageGraphics'):
|
for tmpl in pt.findall('pageGraphics'):
|
||||||
for n in tmpl:
|
for n in tmpl:
|
||||||
if n.tag == 'image':
|
if n.tag == 'image':
|
||||||
self.data = rc + utils._process_text(self, n.text)
|
self.data = rc + utils._process_text(self, n.text)
|
||||||
if n.tag in self._tags:
|
if n.tag in self._tags:
|
||||||
t = self._tags[n.tag](n, self.style,self.localcontext)
|
t = self._tags[n.tag](n, self.style,self.localcontext)
|
||||||
frames[(t.posy,t.posx,n.tag)] = t
|
frames[(t.posy,t.posx,n.tag)] = t
|
||||||
else:
|
else:
|
||||||
self.style.update(n)
|
self.style.update(n)
|
||||||
keys = frames.keys()
|
keys = frames.keys()
|
||||||
keys.sort()
|
keys.sort()
|
||||||
keys.reverse()
|
keys.reverse()
|
||||||
|
|
|
@ -82,7 +82,7 @@ class NumberedCanvas(canvas.Canvas):
|
||||||
def showPage(self):
|
def showPage(self):
|
||||||
self._currentPage +=1
|
self._currentPage +=1
|
||||||
if not self._flag:
|
if not self._flag:
|
||||||
self._pageCount += 1
|
self._pageCount += 1
|
||||||
else:
|
else:
|
||||||
self.pages.update({self._currentPage:self._pageCount})
|
self.pages.update({self._currentPage:self._pageCount})
|
||||||
self._codes.append({'code': self._code, 'stack': self._codeStack})
|
self._codes.append({'code': self._code, 'stack': self._codeStack})
|
||||||
|
|
|
@ -336,8 +336,8 @@ class _rml_stylesheet(object):
|
||||||
attr = {}
|
attr = {}
|
||||||
attrs = ps.attributes
|
attrs = ps.attributes
|
||||||
for i in range(attrs.length):
|
for i in range(attrs.length):
|
||||||
name = attrs.item(i).localName
|
name = attrs.item(i).localName
|
||||||
attr[name] = ps.get(name)
|
attr[name] = ps.get(name)
|
||||||
attrs = []
|
attrs = []
|
||||||
for a in attr:
|
for a in attr:
|
||||||
if a in self._tags:
|
if a in self._tags:
|
||||||
|
|
|
@ -82,7 +82,7 @@ if __name__=='__main__':
|
||||||
</author-list>
|
</author-list>
|
||||||
</test>'''
|
</test>'''
|
||||||
if s.render():
|
if s.render():
|
||||||
print s.get()
|
print s.get()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue