在 Odoo 11 中报告的货币字段没有货币 ID

Ski*_*iBY 5 odoo odoo-11

我尝试在发票报告中打印发票行。为了

<span t-field="l.price_subtotal" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
Run Code Online (Sandbox Code Playgroud)

并为

<span t-field="l.price_subtotal" />
Run Code Online (Sandbox Code Playgroud)

有一个输出:“111.11 $”但我需要不带符号的行价格。

如果我做类似的事情

<span t-esc="round(l.price_total, 2)"/>
Run Code Online (Sandbox Code Playgroud)

它有效,是的,但我失去了货币格式

  1. 有没有办法告诉货币小部件它不应该显示货币?

    “display_currency”:“False”不起作用(

  2. 货币小部件代码在哪里?我在源文件中找不到它(

Alp*_*aki 5

尝试从 qweb 中删除货币符号。与货币格式化

<span t-esc="'{:,.2f}'.format(doc.price_subtotal)" >
Run Code Online (Sandbox Code Playgroud)

或者这将在没有货币格式的情况下打印

<span t-field="doc.price_subtotal" t-field-options="{'widget':'False'}"/>
Run Code Online (Sandbox Code Playgroud)