gpt4 book ai didi

openerp - odoo中的小数精度

转载 作者:行者123 更新时间:2023-12-01 12:49:56 26 4
gpt4 key购买 nike

我在 Odoo 9 社区版中遇到问题,我将数据库字段的小数精度更改为 3,如下所述 enter image description here还有会计/货币的四舍五入。仅在这两个界面中一切正常:

1:销售订单接口(interface)

enter image description here

2:销售订单

enter image description here

好消息是在开发票时,一切都很好:

1:客户发票

enter image description here

2:发票

enter image description here

这个问题有什么解决办法吗?

最佳答案

在Odoo 9中,所有与金额相关的字段都将字段类型更改为“货币”。它们中的大多数都使用 widget="monetary"进行格式化。为了使其根据货币设置工作,需要“currency_id”字段。因此, View 中必须包含“currency_id”字段。例如,在 sale.order.form View 中

. . .
<tree string="Sales Order Lines" editable="bottom" decoration-info="invoice_status=='to invoice'">
. . .
<field name="price_subtotal" widget="monetary"/>
<field name="currency_id" invisible="1"/> <!-- Add this line -->
. . .
</tree>

然后小计将根据销售订单的货币进行格式化。

关于openerp - odoo中的小数精度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34608113/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com