# Odoo Help

By
ANUAR ABU BAKAR
on 5/9/13, 10:22 AM 5,169 views

## Could anyone point to me the right direction to increase the digit at the Price Computation

New Price = Base Price *(1+ 0.0000 )+ 0.0000000

## Rounding Method 0.0000000 Min. Margin 0.0000000 Max. Margin 0.0000000

Edited: This is what I'm trying to achieve.

Example: Using New Price = Base Price * ( 1 + -0.0654206) + 0.0000

If the selling price to customer is \$1.00 New Price = \$1.00 * 0.9345795 = \$0.9345795 After 7% GST = \$0.9345795 * 1.07 =\$ 1.000000065

If the selling price to customer is \$1000.00 New Price = \$1000.00 * 0.9345795 = \$934.5795 After 7% GST = \$934.5795 * 1.07 =\$ 1000.000065

-------------------------------------------- Above sample calculated correctly -----

Example: Using New Price = Base Price * ( 1 + -0.0654) + -0.0000205

If the selling price to customer is \$1.00 New Price = \$1.00 * 0.9346 - 0.0000205 = \$0.9345795 After 7% GST = \$0.9345795 * 1.07 =\$ 1.000000065

If the selling price to customer is \$1000.00 New Price = \$1000.00 * 0.9346 - 0.0000205 = \$934.5999795 After 7% GST = \$934.5999795 * 1.07 =\$ 1000.02197806

----------- if I do this way, the above calculation came out wrong ---------------

I would like to increase the digits in the bracket (1+ 0.0000000) into 7 decimal point instead of the current 4.

Where do I change this.

Thank you so much

#### Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
11594
| 6 8 8
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow

Blog

Sudhir Arya
ERP Harbor Consulting Services
skype:
sudhir@erpharbor.com
Sudhir Arya (ERP Harbor Consulting Services)
On 5/9/13, 11:10 AM

Check the digits under Settings -> Technical -> Database Structure -> Decimal Accuracy search Product Price and open form view and then change Digits to 7.

If you are not creating custom module then you can directly change in core addons.

Go to product/pricelist.py find `product.pricelist.item` object (class product_pricelist_item) and then find `'price_discount': fields.float('Price Discount', digits=(16,4))` in `_column`. Change `digits=(16,4)` value to `digits=(16,7)`.

Sudhir Arya (ERP Harbor Consulting Services)
on 5/10/13, 8:48 AM

#### Priyesh Solanki (pso)

--Priyesh Solanki (pso)--

1150
| 2 2 4
--Priyesh Solanki (pso)--
Priyesh Solanki (pso)
On 5/10/13, 5:30 AM

To change the digit of field, defined in the bracket, Its set from field definition in .py file. By default, its set as 4 but if you wish to change it, you need to make that change in py file as per your need.

Attribute is : digits=(16,4) but you can change it from digits=(16,7).

Thanks, Priyesh Solanki

Thank you. Do you know which .py file that I can change the digits? Thank you

ANUAR ABU BAKAR
on 5/10/13, 8:46 AM

Priyesh Solanki (pso)
on 5/10/13, 9:37 AM
ANUAR ABU BAKAR
On 5/9/13, 12:26 PM

Hi All

Thank you for all the kind response, I've solved the issue.

It's seems I remember correctly, I did change the .py portion but I did not restart the server. Careless mistake .....I start to realise it when you all post "Restart the server" that is when I realise ...it

Sorry for the inconvenient and thank you so much all.

Didier Hernandez M
On 3/26/14, 3:55 AM

This Work like a charm. Thank you Sudhir Arya

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

### Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

2 follower(s)

### Stats

 Asked: 5/9/13, 10:22 AM Seen: 5169 times Last updated: 3/16/15, 8:10 AM