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
| Inputs | Method | Outputs |
|---|---|---|
|
for rec in self:
if not rec.size_id or not rec.location_id:
+ rec.size_value = 0.00
continue
size = self.env["fsm.location.size"].search(
- [
- ("location_id", "=", self.location_id.id),
- ("size_id", "=", self.size_id.id),
- ],
+ Domain(
+ [
+ ("location_id", "=", rec.location_id.id),
+ ("size_id", "=", rec.size_id.id),
+ ]
+ ),
limit=1,
)
- rec.size_value = size.quantity
+ rec.size_value = size and size.quantity or 0.00
|
|
