diff --git a/fieldservice_recurring/models/fsm_recurring.py b/fieldservice_recurring/models/fsm_recurring.py index f84d15fa28..6cb42dc3f6 100644 --- a/fieldservice_recurring/models/fsm_recurring.py +++ b/fieldservice_recurring/models/fsm_recurring.py @@ -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,