• xml中的四则运算与时间爱格式


    取值第一个  和最后一个
    <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样式的垂直剧中 style="vertical-align:middle;"

    <span t-esc="time.strftime('%m/%d/%Y',time.strptime(object.datetimefield,'%Y-%m-%d %H:%M:%S'))"/>


    <tr>
    <td style="word-wrap:break-word;30%;font-size:14px;">客户:<span t-field="o.partner_id"/></td>
    <td class="herdtd" >日 期:<span t-field="o.date" t-field-options='{"format": "MDD"}'/></td>
    <td class="herdtd">税 码:</td>
    <td style="word-wrap:break-word;26%;font-size:14px;">订单编号:<span t-field="o.name"/></td>
    </tr>





  • 相关阅读:
    Aseprite+Cocos:打包像素画图,导入到cocos里并动起来
    自定义博客园个人皮肤
    埃航和737MAX坠毁:软件优先级问题
    淘宝网——软件质量属性场景分析
    王概凯《架构漫谈》阅读笔记
    2965 -- The Pilots Brothers' refrigerator
    UVa10082 -- WERTYU
    1753 -- Flip Game
    1083 -- Moving Tables
    2159 -- Ancient Cipher
  • 原文地址:https://www.cnblogs.com/1314520xh/p/7955587.html
Copyright © 2020-2023  润新知