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

Module: Delivery - Stock

Entity: stock.package

Compute Method: _compute_weight_is_kg

Inputs Method Outputs
self.weight_is_kg = False
uom_id = self.env['product.template']._get_weight_uom_id_from_ir_config_parameter()
if uom_id == self.env.ref('uom.product_uom_kgm'):
            self.weight_is_kg = True
digits = self.env['decimal.precision'].precision_get('Product Unit')
self.weight_uom_rounding = 10 ** -digits

Back to entity