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

Module: Field Service Sizes

Entity: fsm.order

Compute Method: _compute_size_value

View 17.0 View 18.0
Inputs Method Outputs
  • size_id
  • location_id
  • location_id.id
  • size_id.id
+ for rec in self:
+             if not rec.size_id or not rec.location_id:
+                 continue
+             size = self.env["fsm.location.size"].search(
+                 [
+                     ("location_id", "=", self.location_id.id),
+                     ("size_id", "=", self.size_id.id),
+                 ],
+                 limit=1,
+             )
+             rec.size_value = size.quantity
  • size_value

Back to entity