Skip to content

Commit

Permalink
[FIX] helpdesk_mgmt: company_id should come from team
Browse files Browse the repository at this point in the history
Otherwise, creating tickets from fetchmail would always set odoobot's company in new tickets, potentially in contrast to team's company
  • Loading branch information
eLBati committed Mar 25, 2024
1 parent 6e67ebb commit e27a4e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions helpdesk_mgmt/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ def _read_group_stage_ids(self, stages, domain, order):
unattended = fields.Boolean(related="stage_id.unattended", store=True)
tag_ids = fields.Many2many(comodel_name="helpdesk.ticket.tag", string="Tags")
company_id = fields.Many2one(
comodel_name="res.company",
string="Company",
required=True,
default=lambda self: self.env.company,
related="team_id.company_id", string="Company", store=True, readonly=True
)
channel_id = fields.Many2one(
comodel_name="helpdesk.ticket.channel",
Expand Down

0 comments on commit e27a4e8

Please sign in to comment.