Proposal for solving price_accuracy

Registered by Ferdinand

Demos are available in English, German and French (not completely translated) here
 http://www.chricar.at/ChriCar/OpenERP.html

Currently the price_accuracy is defined as startup parameter of the server process
* all databases connecting to this server process get n digit prices etc whatever is defined as price_accuracy at startup
* all products will have prices with "price_accuracy" decimal digits, which looks ridiculous for products which are sold at some 1000€
* database tables are not altered, hence entering something like 1,1111 will result in 11,1100 - except altering the db tables manually
IMHO this "solution" does not meet business needs

Proposal:
the "price accuracy" has to be defined at product level as price_unit.
* per unit
* per 100 units
* per 1000 units and so on
- this would allow to stick to decimal(16,2) definitions in the database
- add ONE field to products view - default price_unit=1
- run only ONE server process
- display the price as
11,11
11,11%
11,11%0
- use standard_price/price_unit internally to calculate various values
IIRC qty*standard_price/price_unit will give a decimal(16,2) target field (if defined so) - exactly what is needed

this should be fairly easy to implement and become part of the standard

BTW using different UOM etc is not appropriate - Example
Purchase of gasoline / diesel -
qty in liter = 1500
price is quoted with 3 or 4 digits 1,1234
OpenERP should quote 112.34%

alternate approach
price in Cents

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Sprints

Whiteboard

tel with Fabien 20090415
price_unit will be integrated in the next version
it's a branch now

20090502
price_unit mostly works

20090918
* Lots of layout improvements
** unified layout of various picking forms
** many colspan="4" fields to make field content readable without scrolling
* price_unit allows to specify price units in SO/PO, picking, invoice
* Role "Document date manual data" switches off the default dates and allows the user to enter arbitrary date in
** Sale Order
** Purchase Order
** Picking / Packing
*** forms show Partner AND Adress
** Invoice
* Stock moves store
** amount: for stock accounting
** amount_sale: for invoicing
* Navigation from SO/PO --> Picking --> Invoice (with small problems https://bugs.launchpad.net/bugs/428006)
20091106
* user preferences - added accounting period - all accounting moves most go into this period (currently checked only for invoices)

---

Modified by Joël Grand-Guiillaume 18th november 2009

Is this blueprint related to mine : https://blueprints.launchpad.net/openobject-server/+spec/generic-accuracy-improvement

Even I don't understand all this problematics, I just have a feeling that it's probably related to this linked blueprint. Defining an accuracy per product sounds good. But, will not solve that number are rounded into the DB...

I suggest to do both blueprint : specified accuracy per product AND change the way OpenERP store float...

Comments are welcome.

Regards,

Joël

(?)

Work Items