Skip to Content
Menu
This question has been flagged
5 Replies
6948 Views


In sales report given in reporting section in sales app, Margin is calculated based on order lines for particular variant ,means unit price - (cost in sales order line)..
Now cost in sales order line is taken based on product onchange (from product variant form).
But in Real time valuation with FIFO.Cost price in product variant is updated once there is an outgoing.so cost price is not updated yet while you are doing sales ,and leading to wrong margin in the Sales report.

For example :
let say product variant  x have 58.5 as cost price in form view.Now i purchased a new unit with 78.
but still cost in product variant is 58.5(because it will update once i do the sales/delivery.)

Now when i create sales order ,odoo will take 58.5 as cost in order line based on product variant  onchange. While it should be 78.

Is this a real issue with Real time -FIFO or i am doing something wrong ?
If it's the issue is there any solution .
And also i don't understand logic behind updating cost after delivery order is done .Is there any particular reason ,odoo has done it in such way ?

Avatar
Discard
Author Best Answer

Hello All, my bad for the late response.
As a solution, what I did is I converted the cost field in the order line as a computed field, which takes values from the Product - Cost field. That way once the delivery order is completed, values in the order line with the latest cost will be updated and hence the correct margin report.

Avatar
Discard

Thanks for the reply.

Can you share your code which one you’re applied.

Best Answer

this has been a bone of contention for us since we started with odoo. as far as we can understand, even with studio, there is no way to have margin be accurate in real time., this means sales people still need to do external calculations to be able to ensure an adequate margin is applied. we found you can only achieve margin reporting accurately once goods are received and delivered (we are using AVCO) and purchase invoices posted.

Avatar
Discard
Best Answer

In FIFO (First In First Out), the cost of the item is determined at the time the picking is completed because the system is able to determine the "first in" batch only at that point in time.

Avatar
Discard
Author

Thanks for the input Paresh! I did some research myself. It turns out that the reason why odoo updated only after the delivery order is ,the cost field in product is not actually cost it is cost of goods sold -> which can only be determined after good has been sold. Because there could be landed cost also be involved in delivering product exact cost of goods sold can only be determine once delivery is done.

However ,the error in margin is real ,because in sale report ,margin is calculated only based on the cost price given in the sales order line at the time of sales order creation .

Dear Bhavik

I'm experiencing the same issue at the moment

Do you have found a solution for the reporting of the margin in de sale reports ?

Thx

Yes ,i found a solution with a customization. 
Bhavik Vyas
ERP-Consultant
9033986379




On Fri, Jan 31, 2020 at 12:19 PM Maarten Gerits <maarten@mgbusiness.net> wrote:

Dear Bhavik

I'm experiencing the same issue at the moment

Do you have found a solution for the reporting of the margin in de sale reports ?

Thx

Envoyé par Odoo S.A. using Odoo.

Best Answer

Hello Bhavik, 

Have you find any solution related to this one?

Avatar
Discard
Best Answer

Dear Bhavik or others,

We are facing the same issue. Could the solution be shared? Thanks



Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
266
1
Dec 22
2522
0
Oct 17
3712
2
Jun 22
4871
0
Feb 16
2562