Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

Manufacturing and delivery weights:

In the Manufacturing app, I would like to know how to auto calculate the weights?

If my product C weight = A + B weights, why are the weights not calculated and printed in the delivery slip (A weight+ B weight = C weight) ?

Thanks

Ricardo

Awatar
Odrzuć
Autor

4 years later and I am faced with the same question, maybe it is badly elaborated:
So let's go:
in a product with a BOM and a manufacturing route, can I not obtain the weight and, why not, also the volume automatically?
product C Weight = component A + component B weight
is it so hard to automatically calculate and provide this information in an integrated system?

Najlepsza odpowiedź

There is no law of conservation of mass in Odoo manufacturing :) 

If your UoM of every product is Kg here then you take care of it while creating products/ BoM. But if you are working through different units and still want to act on "law of conservation of weight" you've got to figure out a customized solution or consult an expert.

Thanks

Vishal

Awatar
Odrzuć
Autor

Thanks, but why the system does not sum all the BOM products weights automatically?

Najlepsza odpowiedź

A simple solution to this question could be the creation of the following server action (image from Odoo version 18):

hope it helps!

code:

for product in records:
    bom = product.bom_ids and product.bom_ids[0] or False
    if not bom:
        continue
    bom_lines = bom.bom_line_ids
    if not bom_lines:
        continue
    total_weight = 0.0
    for line in bom_lines:
        component = line.product_id
        quantity = line.product_qty  # Quantity in units
        component_weight = component.weight or 0.0  # Weight in kg
        weight_contribution = component_weight * quantity
        total_weight += weight_contribution
    product.write({'weight': total_weight})
   
Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You can check this community module : https://www.odoo.com/apps/modules/10.0/product_weight/

This will help you to get the weight of a product as the sum of its component products. Have a look at the module.


Then regarding the weight in delivery slip you can inherit the report template and access the weight of the product from the product master and add to it.


Thanks

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thanks for the reply, but I still have not found a solution for Odoo 11

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 22
3154
2
maj 19
3159
1
mar 23
2158
0
kwi 21
2390
1
lip 19
3063