Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Product logistics UoM

Entity: product.product

Compute Method: _compute_product_weight

Inputs Method Outputs
  • product_tmpl_id
  • weight
  • weight_uom_id
odoo_weight_uom = (
            self.product_tmpl_id._get_weight_uom_id_from_ir_config_parameter()
        )
for product in self:
            product.product_weight = odoo_weight_uom._compute_quantity(
                qty=product.weight,
                to_unit=product.weight_uom_id,
                round=False,  # avoid losing information
            )

Back to entity