Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Maintenance Location
Entity: maintenance.request
Compute Method: _compute_location_id
| Inputs | Method | Outputs |
|---|---|---|
|
for record in self:
if record.equipment_id and record.equipment_id.location_id:
- record.location_id = record.equipment_id.location_id
+ if record.stage_id and record.stage_id.done:
+ # if the request is done, we want keep existing location
+ pass
+ else:
+ record.location_id = record.equipment_id.location_id
+ else:
+ record.location_id = False
|
|
