<fill color="black"/>
<stroke color="black"/>
<drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
- <lines>1cm 25.4cm 20cm 25.4cm</lines>
-<!-- <lines>1cm 25.7cm 7cm 25.7cm</lines>-->
+ <lines>1cm 28.4cm 20cm 28.4cm</lines>
+ <lines>1cm 25.4cm 7cm 25.4cm</lines>
<setFont name="Helvetica" size="10"/>
- <drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
+ <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="26.5cm">
<xsl:value-of select="//corporate-header/corporation/address/zip"/>
<drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/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>
-
+
<!--page bottom-->
-
- <lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
+
+ <lines>1.5cm 2.2cm 19.9cm 2.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
<drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
-
+
</xsl:template>
-
+
<xsl:template name="other_pages_graphics_corporation">
<!--logo-->
<drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
<!--page bottom-->
-
+
<lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
args = [self.eval(browser, arg) for arg in attrs['args'].split(',')]
else:
args = []
-
# get the object
if attrs.has_key('model'):
obj = self.pool.get(attrs['model'])
newdatas = getattr(obj, attrs['name'])(self.cr, self.uid, ids, *args)
def parse_result_tree(node, parent, datas):
+ if not node.tag == etree.Comment:
el = etree.Element(node.tag)
parent.append(el)
atr = self.node_attrs_get(node)
elif attrs['type']=='zoom':
value = self.get_value(browser, attrs['name'])
-
if value:
if not isinstance(value, list):
v_list = [value]
self.parse_node(el_cld, el, v)
else:
# if there is no "type" attribute in the node, copy it to the xml data and parse its childs
- for el_cld in node:
- self.parse_node(el_cld, parent, browser)
-
+ if not node.tag == etree.Comment:
+ if node.tag == parent.tag:
+ el = parent
+ else:
+ el = etree.Element(node.tag)
+ parent.append(el)
+ for el_cld in node:
+ self.parse_node(el_cld,el, browser)
def xml_get(self):
- #return self.doc.toxml('utf-8')
- return etree.tostring(self.doc,encoding="utf-8",xml_declaration=True)
+ return etree.tostring(self.doc,encoding="utf-8",xml_declaration=True,pretty_print=True)
def parse_tree(self, ids, model, context=None):
if not context:
context={}
# parses the xml template to memory
self.dom = etree.XML(xml)
-
# create the xml data from the xml template
self.parse_tree(ids, model, context)