中国财务报表模块会计凭证报表不整齐的问题解决方案
-
公司财务用到了中国财务模块,但在打印的时候有些地方需要调整,最初打印出来的模样是这样的:
[img http://images.cnitblog.com/i/396990/201404/301530200808529.png /img]
很明显,表中多余的3行没用,修改对应的account_move.rml文件,将相关的行注释掉,结果变成了这个样子:
[img http://images.cnitblog.com/i/396990/201404/301531154399042.png /img]
看起来比原来是好多了,但还有问题,数量跟是十亿千百的那块看起来还是很别扭,而且当一页包含多个凭证的时候,页尾就会跑到第二页上去。
修改RML文件在blockTable中修改该行的行高:<blockTable colWidths="40,44,24,24,42,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0" style="&#x8868;&#x683C;2" rowHeights="0.5cm">
rowHeights="0.5cm"即是控制该行行高的代码,看结果:
[img http://images.cnitblog.com/i/396990/201404/301532372982417.png /img]
本文的重点,也是花了我半天时间研究的问题来了,从图中可以看出来,行高是变了,但文字竟然没有跟着上去,还呆在原来的位置。
看代码:<blockTable colWidths="40,44,24,24,42,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0" style="&#x8868;&#x683C;2" rowHeights="0.5cm"><br /> <tr><br /> <td><br /> <para style="P1"><br /> <font color="white"></font><br /> </para><br /> </td><br /> <td><br /> <para style="P1"><br /> <font color="white"></font><br /> </para><br /> </td><br /> <td><br /> <para style="P1">单位</para><br /> </td><br /> <td><br /> <para style="P1">单价</para><br /> </td><br /> <td><br /> <para style="P1">数量</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">亿</para><br /> </td><br /> <td><br /> <para style="P1">千</para><br /> </td><br /> <td><br /> <para style="P1">佰</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">万</para><br /> </td><br /> <td><br /> <para style="P1">千</para><br /> </td><br /> <td><br /> <para style="P1">佰</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">元</para><br /> </td><br /> <td><br /> <para style="P1">角</para><br /> </td><br /> <td><br /> <para style="P1">分</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">亿</para><br /> </td><br /> <td><br /> <para style="P1">千</para><br /> </td><br /> <td><br /> <para style="P1">佰</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">万</para><br /> </td><br /> <td><br /> <para style="P1">千</para><br /> </td><br /> <td><br /> <para style="P1">佰</para><br /> </td><br /> <td><br /> <para style="P1">十</para><br /> </td><br /> <td><br /> <para style="P1">元</para><br /> </td><br /> <td><br /> <para style="P1">角</para><br /> </td><br /> <td><br /> <para style="P1">分</para><br /> </td><br /> </tr><br /> </blockTable>
从代码上真的看不出为什么“数量” 跟后面的“十” 不在同一行,然后开始一点一点地注释,看结果,终于被我发现了。
在该blockTable的样式表的代码中,注释掉<blockValign value="Top"/>一行,文字便跟着上去了:[<blockTableStyle id="&#x8868;&#x683C;2"><br /> <blockAlignment value="LEFT"/><br /> <!--<blockValign value="Top"/>--没错,注释掉我,文字才会上去--><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="0,0" stop="0,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="0,-1" stop="0,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="1,0" stop="1,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="1,-1" stop="1,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="2,0" stop="2,-1"/><br /> <lineStyle kind="LINEABOVE" colorName="#008000" thickness="0.2" start="2,0" stop="2,0"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="2,-1" stop="2,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="3,0" stop="3,-1"/><br /> <lineStyle kind="LINEABOVE" colorName="#008000" thickness="0.2" start="3,0" stop="3,0"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="3,-1" stop="3,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="4,0" stop="4,-1"/><br /> <lineStyle kind="LINEABOVE" colorName="#008000" thickness="0.2" start="4,0" stop="4,0"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="4,-1" stop="4,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="5,0" stop="5,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="5,-1" stop="5,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="6,0" stop="6,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="6,-1" stop="6,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="7,0" stop="7,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="7,-1" stop="7,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="8,0" stop="8,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="8,-1" stop="8,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="9,0" stop="9,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="9,-1" stop="9,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="10,0" stop="10,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="10,-1" stop="10,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="11,0" stop="11,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="11,-1" stop="11,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="12,0" stop="12,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="12,-1" stop="12,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="13,0" stop="13,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="13,-1" stop="13,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="14,0" stop="14,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="14,-1" stop="14,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="15,0" stop="15,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="15,-1" stop="15,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="16,0" stop="16,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="16,-1" stop="16,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="17,0" stop="17,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="17,-1" stop="17,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="18,0" stop="18,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="18,-1" stop="18,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="19,0" stop="19,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="19,-1" stop="19,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="20,0" stop="20,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="20,-1" stop="20,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="21,0" stop="21,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="21,-1" stop="21,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="22,0" stop="22,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="22,-1" stop="22,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="23,0" stop="23,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="23,-1" stop="23,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="24,0" stop="24,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="24,-1" stop="24,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="25,0" stop="25,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="25,-1" stop="25,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="26,0" stop="26,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="26,-1" stop="26,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="27,0" stop="27,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="27,-1" stop="27,-1"/><br /> <lineStyle kind="LINEBEFORE" colorName="#008000" thickness="0.2" start="28,0" stop="28,-1"/><br /> <lineStyle kind="LINEAFTER" colorName="#008000" thickness="0.2" start="28,0" stop="28,-1"/><br /> <lineStyle kind="LINEBELOW" colorName="#008000" thickness="0.2" start="28,-1" stop="28,-1"/><br /> </blockTableStyle>
这是结果:
[img http://images.cnitblog.com/i/396990/201404/301533572208932.png /img]
但是我还是不知道为什么注释掉这行就可以让文字上去,而且,明显地看出来 实际上“数量”跟“十“还是不在同一水平线上,没找到在哪控制他们的位置的代码,另外吐槽一下关于RML的资料实在是太少了,很多都不知到什么意思,好在现在多少可以用了。希望模块的作者 Joshua 能解释下我的疑问。 -
[quote]另外吐槽一下关于RML的资料实在是太少了[/quote]
这里是RML的语法说明:[attachurl=1]
不过OpenERP只实现这个RML的一个子集,并不是所有的标签都支持。另外,8.0以后OpenERP会全面用Qweb report取代RMLreport。不过,看一下这个资料对你现在的报表调整还是有帮助的。