Update costs from purchase
by Moduon https://github.com/OCA/purchase-workflow , Odoo Community Association (OCA) https://github.com/OCA/purchase-workflow| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 245 |
| Technical Name |
purchase_stock_cost_update |
| License | LGPL-3 |
| Website | https://github.com/OCA/purchase-workflow |
Update costs from purchase

This module allows to adjust the valuation of the incoming goods related to their purchase order from the purchase line itself.
Table of contents
Use Cases / Context
When a purchase order is confirmed, the value of the received goods is updated upon reception. It can happen anyway that the reception of the goods is confirmed before the final price is recorded in the corresponding purchase line.
For that, Odoo will fix the valuation when the invoice for that purchase is confirmed, but that moment could be delayed for an uncertain period of time while thos stored goods are being selled with wrong margins and the value being discounted for a wrong price unit.
We want to fix those disalignments as soon as possible from the purchase order while keeping the native mechanism to add later corrections from the invoice itself.
Configuration
In order to use this module, you need to have some storable products valued on average cost (AVCO).
To do so:
- Go to Inventory > Configuration > Product Categories and select one.
- In the Inventory valuation section, select the Costing method as Average Cost (AVCO).
- Now all the products in that category will have that valuation rules.
Usage
In order to test the module:
- Go to Purchase > Orders and create a new quotation.
- Add a product with AVCO valuation and set a price.
- Validate the purchase order.
- Receive the products.
- The products are now valued at the price you set in the order line.
- You can check it in Inventory > Reporting > Valuation (debug mode needed).
- Now change the price in the order line.
- You’ll see that the line has changed its color to yellow and a new button Fix valuation shows up in the header.
- When you click that button, every disaligned valuation will be fixed. If you go to the Valuation report you’ll see the adjustment layer.
- After this, when you invoice the purchase you won’t be able to edit the price anymore.
- You can anyway add an additional valuation when you post the new invoice prices.
Known issues / Roadmap
- Only AVCO is supported
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Moduon
Contributors
- David Vidal (Moduon)
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainers:

This module is part of the OCA/purchase-workflow project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Please log in to comment on this module