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_id

Inputs Method Outputs
  • type
  • type.id
for rec in self:
            if rec.type:
                rec.size_id = (
                    self.env["fsm.size"].search(
                        Domain(
                            [
                                ("type_id", "=", rec.type.id),
                                ("is_order_size", "=", True),
                            ]
                        ),
                        limit=1,
                    )
                    or False
                )
            else:
                rec.size_id = False

Back to entity