我正在修改OpenERP员工薪资单RML报告,我想按收入或扣减来分割行。这就是我所期望的最终结果:
_____________________________ _____________________________
| Earnings | Deductions |
| | |
| Description Amount | Description Amount |
| BASIC 7000.00 | Provident Fund 300.0 |
| House Rent 500.00 | Professional Tax 200.0 |
| Conveyance 200.00 | |
| Other Allowance 300.00 | |
|_____________________________|_____________________________|但是,当扣减和收入线的长度不一样时,我就得到了这样的结果:
_____________________________ _____________________________
| Earnings | Deductions |
| | |
| Description Amount | |
| BASIC 7000.00 | |
| House Rent 500.00 | Description Amount |
| Conveyance 200.00 | Provident Fund 300.0 |
| Other Allowance 300.00 | Professional Tax 200.0 |
|_____________________________|_____________________________|这是我的RML:
<blockTable colWidths="270, 270">
<tr>
<td><para style="P15">Earnings</para></td>
<td><para style="P15">Deductions</para></td>
</tr>
<tr>
<td>
<blockTable colWidths="200.0, 70.0">
<tr>
<td>Description</td>
<td>Amount</td>
</tr>
</blockTable>
<section>
<blockTable colWidths="200.0, 70.0">
<para style="P4">[[repeatIn(get_payslip_lines(o.line_ids, 'earnings'),'p') ]]</para>
<tr>
<td>[[ p['name'] ]]</td>
<td>[[ p['amount'] ]]</td>
</tr>
</blockTable>
</section>
</td>
<td>
<blockTable colWidths="200.0, 70.0">
<tr>
<td>Description</td>
<td>Amount</td>
</tr>
</blockTable>
<section>
<para style="P4">[[repeatIn(get_payslip_lines(o.line_ids, 'deductions'),'d') ]]</para>
<blockTable colWidths="200.0, 70.0">
<tr>
<td>[[ d['name'] ]]</td>
<td>[[ abs(d['amount']) ]]</td>
</tr>
</blockTable>
</section>
</td>
</tr>
</blockTable>请告诉我正确的标记。
发布于 2013-11-24 01:43:18
您需要的是设置表格单元格的垂直对齐。为了这个目的你必须用a。
<stylesheet>
<blockTableStyle id="T1">
<blockValign value="TOP"/>
</blockTableStyle>
<stylesheet> 在那之后,在你的表格定义中:
<blockTable colWidths="270, 270" style="T1">
<tr>
<td><para style="P15">Earnings</para></td>
<td><para style="P15">Deductions</para></td>
</tr>
<tr>
<td>
<blockTable colWidths="200.0, 70.0">
<tr>
<td>Description</td>
<td>Amount</td>
</tr>
</blockTable>
<section>
<blockTable colWidths="200.0, 70.0">
<para style="P4">[[repeatIn(get_payslip_lines(o.line_ids, 'earnings'),'p') ]]</para>
<tr>
<td>[[ p['name'] ]]</td>
<td>[[ p['amount'] ]]</td>
</tr>
</blockTable>
</section>
</td>
...https://stackoverflow.com/questions/20027638
复制相似问题