如何在odoo pdf报告中为超过一千的数字添加逗号?

问题描述

我在odoo13中创建了一个模块,该模块显示存款,取款和余额。我希望所有超过一千的金额都用逗号分隔。现在报告只显示1000,我想要的是1000。先感谢您。也许这是一个简单的问题,但我是所有这方面的初学者。

我要用逗号表示的金额是“金额”和“余额”。这是我的代码的一部分:

<tbody>
  <t t-set = "num" t-value = "0"/>
  <t t-set = "balance" t-value = "account.initial_amount"/>
  <t t-set = "transaction" t-value = "0"/>
  <t t-foreach = "movements_list" t-as= "move">
  <tr>
    <td>
     <t t-set= "num" t-value = "num +1"/>
     <t t-esc = "num"/>
    </td>
    <td>
     <t t-esc = "move['date']"/>
    </td>
    <td class = "text-left">
      <t t-if = "move['type_operation'] == 'withdraw'">
         <span>Retiro</span>
      </t>
      <t t-else = "">
         <span>Depósito</span>
      </t>
    </td>

    <td>
    <t t-if = "move['type_operation'] == 'withdraw'">
     <t t-esc = "move['amount']"/>
     <t t-set = "transaction" t-value = "move['amount']"/>
     <t t-set = "balance" t-value = "balance - transaction"/>
    </t>
    </td>

    <td>
    <t t-if = "move['type_operation'] == 'deposit'">
    <t t-esc = "move['amount']"/>
    <t t-set = "transaction" t-value = "move['amount']"/>
    <t t-set = "balance" t-value = "balance + transaction"/>
    </t>
    </td>

    <td>
     <span t-esc = "balance"/>
    </td>
    </tr>
    </t>
    
    </tbody>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...