zoukankan      html  css  js  c++  java
  • 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>





  • 相关阅读:
    调用系统地图进行导航
    ShareSDK使用简介
    FMDB
    关于uitableView的Group模式滑动偏移问题
    iOS GCD详解
    通知中心传值
    开源 iOS 项目分类索引大全
    iOS10隐私设置及相应问题
    支付
    OC中如何把字典中的数据拼接成url字符串
  • 原文地址:https://www.cnblogs.com/1314520xh/p/7955587.html
Copyright © 2011-2022 走看看