Cost price - decimal accuracy

Bug #743630 reported by Steffi Frank (Bremskerl, DE)
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP R&D Addons Team 2

Bug Description

This bug might be related to https://bugs.launchpad.net/openobject-addons/+bug/726816. I'm sorry that I'm this late with "my idea"....

product_product.standard_price field shouldn't gets its precision neither from 'account' nor from 'purchase price' - it should have it's own accuracy entry in 'decimal accuracy'

I don't want my purchase orders calculated or printed with 6 digits, and I don't want any outgoing invoice calculated or printed with 6 digits.

But for average price calculation I NEED more than 2 digits!

example:

Create new product, costing method = average price (set to 0,00)

Create PO_1: 10 pce, price 1,- Euro, reception
-> move anlaysis (total): qty 10, value 10,- Euro
-> product.form average price = 1,-

Create PO_2: 10 pce, price 1,50 Euro, reception
-> move analysis (total): qty 20, value 25,- Euro
-> product.form average price = 1,25

Create delivery order: 10 pce, process and validate
-> move analysis (total): qty 10, value 12,50 Euro
-> product.form average price = 1,25

Create PO_3 10 pce, price 1,- Euro, reception
-> move analysis (total): qty 20, value 22,40 Euro
Product.form average price = 1,12

This is how OpenERP book explains the average price calculation formula:
NP = (OP * QS + PP * QR) / (QS + QR),
where the following notation is used:
• NP: New Price,
• OP: Old Price,
• QS: Quantity actually in Stock,
• PP: Price Paid for the quantity received,
• QR: Quantity Received.

In my example (last recalculation of average price through reception PO_3) it would mean:
OP = 1,25
QS = 10
PP = 1,00
QR = 10

NP = (1,25 * 10 + 1,00 * 10) / (10 + 10) = 1,125

first issue:
The stock value after the last reception (PO3) is 22,50 Euro (1,25 * 10 + 1,00 * 10), move analysis says: 22,40 Euro

second issue:
Rounding cost price: 1,125 should have get rounded up to 1,13 instead of down to 1,12

So, I don't need 6 digits when I purchase for 1,50 Euro; I don't need 6 digits when I sale for 2,75 Euro.

But I need a solution for
A) wrong stock value
B) wrong average price

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Note: to be discussed with QDP before fixing anything

Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Hello,

Your idea is indeed interesting. However, this is more a wishlist than a real bug. We currently do not plan to integrate that sort of calculation.

Best regards,

Thibault Delavallée.

Changed in openobject-addons:
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.