Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

4 decimal places instead of 2 not global

Subscribe

Get notified when there's activity on this post

This question has been flagged
customizationdecimals
5 Replies
17968 Views
Avatar
gerwin@simbeton.nl

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






2
Avatar
Discard
Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Best Answer

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.

3
Avatar
Discard
gerwin@simbeton.nl
Author

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?

Sudhir Arya (ERP Harbor Consulting Services)

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.

gerwin@simbeton.nl
Author

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.

Avatar
Terje Tõnutare
Best Answer

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

Thanx

1
Avatar
Discard
Tim Drinkwater

Not sure which version you are running but this process works in V14:

https://www.odoo.com/forum/help-1/decimal-accuracy-for-a-custom-studio-float-field-168259#answer-168268

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Change decimal places in delivery slips
decimals
Avatar
Avatar
1
Sep 25
1323
module Extention/ Customization
customization
Avatar
Avatar
Avatar
Avatar
Avatar
5
Aug 24
4086
How to custom our Odoo LMS page?
customization
Avatar
0
Jan 22
3191
How to remove the "Create & Edit" on order lines ? Solved
customization
Avatar
1
Mar 25
5180
How to use AND conditions in the search bar instead of OR ? Solved
customization
Avatar
1
Sep 21
6858
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now