Ir al contenido
Menú
Se marcó esta pregunta

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

Avatar
Descartar
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?

Mejor respuesta

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

Avatar
Descartar
Autor

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

Mejor respuesta

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})
   
Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar
Autor Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 22
3105
2
may 19
3074
1
mar 23
2068
0
abr 21
2342
1
jul 19
3028