Wrong margin calculation in SO

Asked by Kevin McMenamin

V6.0.3

Create a SO for a product with procurement method = on order (SP = 21.48, qty = 10, disc = 40%). In SO line record, margin = 59.58% and purchase_price is null.
Open the PQ record and change the purchase price to $18. Convert to PO.
Receipt stock & process AP invoice
Despatch goods and confirm sales invoice.

On SO line, margin now -14.22 and purchase_price still null.

1. Margin calculation wrong - should be -39.66
2. purchase_price not updated.

Question information

Language:
English Edit question
Status:
Expired
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #891909.

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) said :
#1

Hello Kevin ,

I have checked this issue but I don't agree with you
the product margin calculated based on Cost price of product
not from the purchase order's price.
so the formula is

 product margin = (( sale price - cost price ) * sale order qty ))

Now let me explain about your scenario ,
when you have changed the PO's price the product cost will update, if
you have set "Average price" on product but your Sale Order is already confirmed so
it takes a products old cost price.
That's why it not consider a updated cost price.

So this is not a bug and I am closing this issue,

Hope this will helps you.

Correct me if I am wrong.

Thanks for understanding.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.