Hello all,
hope you all are doing well, I am using ODOO 16, and trying to get the weight of the finished product, I am not sure how it will be done. I don't want to change the unit of measure in my Raw material but I simply want to add the weight property of that material, so depending on how many parts have been made from that raw material, my finished product's weight will be the sum of it. I have nested bill of material which contains hardware and products which have been made from raw material. Any leads would be appreciated.
thank you and have a great day!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
In Odoo, to achieve the functionality you are describing, you can use the concept of "weight" as a property of the product. Here are the steps to set up a custom field for weight and calculate the total weight of the finished product based on the raw materials used:
Step-by-Step Guide:
Add a Custom Field for Weight:
Go to the "Inventory" module.
Open the "Products" menu and select "Products."
Find and edit the raw material product.
Add a new custom field for "Weight" (e.g., a Float field).
Update Bill of Materials (BoM):
For each finished product that includes the raw material, update the BoM.
In the BoM, add the quantity of the raw material needed for one unit of the finished product.
This quantity will be used to calculate the weight of one unit of the finished product based on the weight of the raw material.
Create a Computed Field for Total Weight:
Go to the "Sales" module.
Open the "Settings" and enable the "Developer Mode."
Go to "Technical" -> "Database Structure" -> "Models."
Find and open the model for the finished product.
Add a computed field for "Total Weight" based on the quantity of the raw material and its weight.
Update BoM with Raw Material Weight:
In the BoM of the finished product, add a new field for the weight of the raw material required for one unit of the finished product.
python
raw_material_weight = fields.Float(string='Raw Material Weight')
Update the BoM records with the weight of the raw material.
Update View:
Go to the "Technical" -> "User Interface" -> "Views."
Find and edit the view of the finished product to display the new computed field for "Total Weight."
Test:
Create a new sale order with the finished product and check if the total weight is calculated correctly.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up