码迷,mamicode.com
首页 > 其他好文 > 详细

xml中的四则运算

时间:2017-12-02 22:11:09      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:back   ann   price   color   style   nes   each   ems   enter   

取值第一个  和最后一个
<tr>

<td height="28" colspan="2" style="font-size:14px" scope="col"><div align="left">2.1、材料交期:<span t-field="o.line_id[0].date_planned"/> --- <span t-field="o.line_id[-1].date_planned"/> </div></td>

</tr>


<t t-set="q"  t-value="q+l.price_unit*l.product_uom_qty"/>

 <t t-set="items" t-value="[0]" />
<t t-set="i" t-value="0" />
<tr t-foreach="o.move_lines" t-as="l" bgcolor="#fff" class="gxtr">
<t t-set="t" t-value="0"/>
<t t-set="t" t-value="t+l.price_unit*l.product_uom_qty"/>
<t t-set="i" t-value="i+1" />
<td height="25"><t t-esc="i"/></td>
<td><span t-field="l.product_id.pname"/></td>
<td><span t-field="l.product_id.spec"/></td>
<!--<td><span t-field="l.product_id.material"/></td>-->
<td><span t-field="l.product_uom"/></td>
<td><div align="center"><span t-field="l.product_uom_qty"/></div></td>
<td><div align="center"><span t-field="l.price_unit"/></div></td>
<td><div align="center"><t t-esc="t"/></div></td>
<td><span t-field="l.meno"/></td>
<td><span t-field="l.khwl_code"/></td>
<t t-set="q" t-value="q+l.product_uom_qty"/>
<t t-set="p" t-value="p+t"/>
</tr>
 


xml中的四则运算

标签:back   ann   price   color   style   nes   each   ems   enter   

原文地址:http://www.cnblogs.com/1314520xh/p/7955587.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!