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_volume

Inputs Method Outputs
  • product_tmpl_id
  • volume
  • volume_uom_id
odoo_volume_uom = (
            self.product_tmpl_id._get_volume_uom_id_from_ir_config_parameter()
        )
for product in self:
            product.product_volume = odoo_volume_uom._compute_quantity(
                qty=product.volume,
                to_unit=product.volume_uom_id,
                round=False,  # avoid losing information
            )

Back to entity