OpenERP 关于rml报表的修改
-
再整理一下,一个rml表,主要包括以下几部分:
第一部分:表的说明<br /><?xml version="1.0"?><br /><document filename="test.pdf"><br /> <template pageSize="(204.0,842.0)" title="Receipt" author="OpenERP S.A. ([email protected])" allowSplitting="20"><br /> <pageTemplate id="first"><br /> <frame id="first" x1="0.0" y1="0.0" width="204" height="800"/><br /> </pageTemplate><br /> </template><br />
第二部分 表的格式,包括每个表的格线等<br /> <stylesheet><br /> <blockTableStyle id="Standard_Outline"><br /> <blockAlignment value="LEFT"/><br /> <blockValign value="TOP"/><br /> </blockTableStyle> <br /> <blockTableStyle id="Table10"><br /> <blockAlignment value="LEFT"/><br /> <blockValign value="TOP"/><br /> <lineStyle kind="LINEABOVE" colorName="#000000" start="0,1" stop="0,1"/><br /> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/><br /> <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/><br /> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/><br /> <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/><br /> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/><br /> </blockTableStyle><br /> <initialize><br /> <paraStyle name="all" alignment="justify"/><br /> </initialize><br /> </stylesheet><br />
第三部分,表格内容<br /> <story><br /> <blockTable colWidths="68.0,68.0,68.0"><br /> <tr><br /> <td><br /> <para>Description</para><br /> </td><br /> <td><br /> <para>Qty</para><br /> </td><br /> <td><br /> <para>Price</para><br /> </td><br /> </tr><br /> <tr><br /> <td><br /> <para>[[ repeatIn(o.lines,'line') ]]</para><br /> <para>[[ line.product_id.name ]]</para><br /> <para><br /> <font color="white"> </font><br /> </para><br /> </td><br /> <td><br /> <para>[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para><br /> </td><br /> <td><br /> <para>[[o.state=='cancel' and o.statement_ids and '-' or '']][[ formatLang(net(line.id), currency_obj=company.currency_id) ]] <font face="Helvetica">[[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ formatLang(line.discount, currency_obj=company.currency_id) ]])</font></para><br /> </td><br /> </tr><br /> </blockTable><br /> </story><br /></document><br />
就是以上三部分控制着一个表格 -
谢谢分享,还没到报表开发阶段呢,先mark