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.move

Compute Method: _cal_move_weight

Inputs Method Outputs
  • product_qty
  • product_id
  • product_id.weight
moves_with_weight = self.filtered(lambda moves: moves.product_id.weight > 0.00)
for move in moves_with_weight:
            move.weight = (move.product_qty * move.product_id.weight)
(self - moves_with_weight).weight = 0

Back to entity