Skip to content

Commit

Permalink
[FIX] fieldservice_agreement: FSM Location Agreement Bug (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
osi-scampbell authored and max3903 committed Jun 18, 2019
1 parent cf62288 commit d3ff4c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fieldservice_agreement/models/fsm_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class FSMLocation(models.Model):
def _compute_service_ids(self):
for loc in self:
agreements = self.env['agreement'].\
search([('fsm_location_id', '=', self.name)])
search([('fsm_location_id', '=', loc.id)])
ids = []
for agree in agreements:
servpros = self.env['agreement.serviceprofile'].\
search([('agreement_id', '=', agree.id)])
for ser in servpros:
if ser.id not in ids:
ids.append(ser.id)
self.serviceprofile_ids = ids
loc.serviceprofile_ids = ids

0 comments on commit d3ff4c4

Please sign in to comment.