跳至内容
菜单
此问题已终结
5 回复
17147 查看

Hello there,

I would like to ask you guys for some additional help. We are encountering a little problem with the decimals. When we sell our products the prices may show 2 decimals so that's correct and should stay that way. 

But when purchase any products from a vendor the prices needs to be filled in with 4 or 5 decimals without using any rounding method. Now if I buy multiple products from our vendor the prices are rounded, I would like to give fill in prices "only within the purchase tab in the product form" with as many decimals as I want. 

We use "for now" the online Odoo version this will soon be the Odoo Estate version. Can I change this with XPath customization or are there some hidden configuration settings for each specific field? 


Additional information:

Relation: product.supplierinfo

Field: seller_ids

Type of field: float

Object: product.template

Update:

I created a new decimal precision (purchase prices) with 4 decimals in the technical settings. Can I just assign that new precision to any field? If yes, how can I do that? 

Thanks already for your help. 

Kinds regards,

Gerwin






形象
丢弃
最佳答案

There is a configuration to increase / decrease the decimal precision. In your case, you need to change the value for "Product Price".

You can find this configuration in "Technical / Database Structure / Decimal Accuracy" and then search for record for "Product Price" and change the value of "Digits" field.

形象
丢弃
编写者

Thanks for your support. This I tried already, but then the prices of the products will be in 4 digits also. I only want the vendor purchase price to be 4 digits. Otherwise, the price's that I will sell for won't match. Do you get what I mean? I'm now trying to edit the Xpath in Odoo Studio XML editor and add this: digits="get_precision('Purchase prices')" but that didn't work also :S

Some suggestions?

I think you will need little customization. In the custom module, you will have to overwrite the field and then change the digits as per your need.

编写者

I got the following fields in the: Odoo Studio: product.template.product.form customization

<tree string="Vendor Information">

<field name="sequence" widget="handle"/>

<field name="name"/>

<field name="product_id" invisible="context.get('product_template_invisible_variant', False)" groups="product.group_product_variant"/>

<field name="product_tmpl_id" string="Product" invisible="context.get('visible_product_tmpl_id', True)"/>

<field name="min_qty"/>

<field name="product_uom" groups="uom.group_uom"/>

<field name="price" target="Price" string="Inkoop prijs" widget="monetary" digits="get_precision('Purchase prices')"/>

<field name="currency_id" groups="base.group_multi_currency"/>

<field name="date_start"/>

<field name="date_end"/>

</tree>

Can I make the little customization in here? Or somewhere else?

Thanks again for your response.

最佳答案

Hey Gerwin! Did you ever solve this issue? If yes, could you share please. 

Thanx

形象
丢弃
相关帖文 回复 查看 活动
0
7月 25
724
5
8月 24
2784
0
1月 22
2506
1
3月 25
4474
1
9月 21
6155