Skip to content

Commit

Permalink
fieldservice_recurring: fix default team
Browse files Browse the repository at this point in the history
support multicompany
  • Loading branch information
hparfr authored and brian10048 committed Nov 13, 2023
1 parent c983530 commit 57742c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fieldservice_recurring/models/fsm_recurring.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class FSMRecurringOrder(models.Model):
_inherit = ["mail.thread", "mail.activity.mixin"]

def _default_team_id(self):
return self.env.ref("fieldservice.fsm_team_default")
return self.env["fsm.team"].search(
[["company_id", "in", (self.env.company.id, False)]],
limit=1,
order="sequence",
)

name = fields.Char(
required=True,
Expand Down

0 comments on commit 57742c5

Please sign in to comment.