It is currently Tue May 22, 2012 10:32 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: decimal accuracy of Cost Price for a product
PostPosted: Fri Feb 25, 2011 8:15 pm 
Offline

Joined: Fri Feb 25, 2011 7:57 pm
Posts: 3
Hello,

Being new to OpenERP, I am struggling with changing the decimal accuracy of Cost Price when defining a product. We typically need 5 decimal places for some of the smaller components and I am unable to modify the default 2.

Version 6.0.1.

I modified the standard_price in table product_template to numeric(16,5), but the webclient is locked at 2 decimal places. When I enter more decimal places the webclient rounds to 2 decimal places.

Any help would be appreciated.

Thanks,
Radek


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Sat Feb 26, 2011 1:33 am 
Offline

Joined: Fri Apr 24, 2009 8:36 pm
Posts: 54
Change the price_accuracy option on your server command line or in your server configuration file.

http://doc.openerp.com/v6.0/developer/1 ... _line.html

After you've changed it, restart the server and either create a new database or migrate your existing database (File: Databases: Migrate Databases).


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Mon Feb 28, 2011 8:23 pm 
Offline

Joined: Fri Feb 25, 2011 7:57 pm
Posts: 3
I tried that. There is no option (in V6) for that particular command line option.

Has anyone been able to do this in V6?

Thanks,
Radek


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Mon Feb 28, 2011 9:59 pm 
Offline

Joined: Fri Apr 24, 2009 8:36 pm
Posts: 54
Sorry, I didn't know that had changed in v6. After a bit of digging, I found the following:

1. Make sure you have the extended user interface. The setting is on your user screen.
2. From the Administration menu, choose Customization: Database Structure: Decimal Accuracy.
3. There are several different settings for different fields in the system. You asked about the cost price of a product, and that one is set by the "Account" setting. Obvious, right? I had to check the source code to figure that out.
4. Open the entry you want to change, type the new value for the digits field, and save it. Don't change the Usage field, or it will stop working.
5. Close the product screen and reopen it. The cost price field should now have the number of digits you asked for.

I'll add some documentation on the price accuracy configuration to this page:
http://doc.openerp.com/v6.0/book/6/6_16 ... icing.html

Feel free to suggest other places in the documentation where it might fit better.

Don


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Mon Feb 28, 2011 10:21 pm 
Offline

Joined: Fri Feb 25, 2011 7:57 pm
Posts: 3
Worked perfectly. Yes, the Account setting was not obvious. :-)

Thanks for the help.
Radek


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Wed Mar 02, 2011 2:45 am 
Offline

Joined: Fri Apr 24, 2009 8:36 pm
Posts: 54
OK, the documentation is updated, and I reported a bug saying that the cost field should use the Purchase Price setting instead of the Account setting. The bug got confirmed and assigned, so it will probably get fixed.


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Fri Sep 16, 2011 10:08 am 
Offline

Joined: Sun Aug 14, 2011 2:27 pm
Posts: 3
Location: Brest, Belaurs
How can I change accuracy in Bill of Material view and pdf report?
It is not possible to change it through Decimal Accuracy module.


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Mon Sep 19, 2011 7:00 pm 
Offline

Joined: Fri Apr 24, 2009 8:36 pm
Posts: 54
I assume you want to change the precision of the mrp_bom.product_qty field. That isn't configurable, you would have to edit the source code in the addons/mrp/mrp.py file. The mrp_bom._columns dict defines 'product_qty' as a float and leaves the digits unspecified. If you add the parameter digits=(16, 5), for example, you would get 5 digits of precision.

I'm not sure if that setting will carry through to the report, but it should change the view and the database.

Oh, and the bug I reported for this thread has been fixed.


Top
 Profile  
 
 Post subject: Re: decimal accuracy of Cost Price for a product
PostPosted: Tue Sep 20, 2011 12:32 am 
Offline

Joined: Tue Jan 18, 2011 5:16 pm
Posts: 236
there is a module for that mrp_bom_decimalprecision

Hope it helps you.

_________________
OpenERP debugging with Eclipse on headless server


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP