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

Module: WMS Accounting

Entity: stock.move

Compute Method: _compute_remaining_value

View 20.0
Inputs Method Outputs
  • is_in
  • product_id
  • product_id.cost_method
  • quantity
  • remaining_qty
  • value
  • standard_price
+ for move in self:
+             if not move.is_in:
+                 move.remaining_value = 0
+                 continue
+             if move.product_id.cost_method == 'fifo':
+                 ratio = move.remaining_qty / move.quantity if move.quantity else 0
+                 move.remaining_value = ratio * move.value if ratio else 0
+             else:
+                 move.remaining_value = move.remaining_qty * move.standard_price
  • remaining_value

Back to entity