This question has been flagged

Impacted versions:

8.0 and above

Steps to reproduce:

Step 1.

Create a Supplier: Pepsi Co and Create a Product: “Can”. In Costing Method of product select: Average Price.

Step 2.

Operation: Create a Purchase Order with above Supplier and Product. Quantity = 5, Purchase Price = 10. Confirm Purchase, Receive Products and Validate Invoice.

Results:

Total Cost of Products = 50. Total Quantity = 5. Adjusted Cost per Can = 10.

Step 3.

Operation: Create a Purchase Order with above Supplier and Product. Quantity = 8, Purchase Price = 15. Confirm Purchase, Receive Products and Validate Invoice.

Results:

Total Cost of Products = 170. Total Quantity = 13. Adjusted Cost per Can = 13.08.

Step 4.

Operation: Create a Sales Order with above Supplier and Product. Quantity = 4, Sales Cost Generated By Odoo will be = 13.08. Confirm Sale, Transfer Products and Validate Invoice.

Results:

Total Cost of Products = 117.69. Total Quantity = 9. Adjusted Cost per Can = 13.08

Step5.

Operation: Create a Purchase Order with above Supplier and Product. Quantity = 50, Purchase Price = 1. Confirm Purchase, Receive Products and Validate Invoice.

Results:

Total Cost of Products = 167.69. Total Quantity = 59. Adjusted Cost per Can = 2.84.

Step 6.

Now, Suppose I forgot to register a purchase order after Step 3. Register it with the back Date so it will be after second PO: Quantity = 25, Purchase Price = 50. Confirm Purchase, Receive Products and Validate Invoice.

Results:

Total Cost of Products = 1417.69. Total Quantity = 84. Adjusted Cost per Can = 16.88.

This Last Cost Of Product calculated by ODOO is TOTALLY INCORRECT!

Cost should be 15.72.

Reasons:

Last Picking was made was with back date after third step, and If you make it after step 3 without “”forgetting”, then the Cost will be: 15.72. This means that program didn’t recalculate the cost as should have done. It means that Inventory valuation becomes incorrect if someone makes a purchase with back date.

If user uses Anglo Saxon Accounting (Which writes off cost with journal entry), then the journal entry posted by sale will be INCORRECT as well.

Expected Behavior

Program should recalculate the cost of the product if user registers the purchase with the back date. Same is for Sales for Back Dates.

Note:

Forgetting to register sale or purchase is normal and is faced in everyday operations. Incorrect Inventory value will result in charges from TAX Department or Noticed in Audit Reports.

Avatar
Discard
Author Best Answer

https://github.com/odoo/odoo/issues/6618#issuecomment-100183009

Avatar
Discard
Best Answer

Is this issue resolved?


Avatar
Discard
Best Answer

Recalculation of backdated entries not a best practice. the reason is as and when the stock move happens system calculating the cost.

If you have installed Anglo saxon even cost of sales also calculated so recalculating the cost for the done transactions will effect the system reliability.

In Average cost you have option to update the cost in product master manually

Avatar
Discard