Skip to content

Commit

Permalink
[IMP] oxigen_maintenance: Unforce company
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Sep 27, 2023
1 parent 7670123 commit 2f82f5e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions oxigen_maintenance/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from . import contract_contract
from . import maintenance_team
from . import maintenance_equipment_operating_system
from . import maintenance_request
1 change: 1 addition & 0 deletions oxigen_maintenance/models/maintenance_equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class MaintenanceEquipment(models.Model):
_inherit = "maintenance.equipment"

stock_location_id = fields.Many2one("stock.location", string="Location")
company_id = fields.Many2one(default=lambda r: False)
my_team_equipment = fields.Boolean(
search="_search_my_team_equipment", compute="_compute_my_team_equipment"
)
Expand Down
10 changes: 10 additions & 0 deletions oxigen_maintenance/models/maintenance_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MaintenanceRequest(models.Model):
_inherit = "maintenance.request"

company_id = fields.Many2one(default=lambda r: False)
4 changes: 3 additions & 1 deletion oxigen_maintenance/models/maintenance_team.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Copyright 2023 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from odoo import models
from odoo import fields, models


class MaintenanceTeam(models.Model):
_inherit = "maintenance.team"

company_id = fields.Many2one(default=lambda r: False)

def _get_parent_teams(self):
if not self:
return self
Expand Down

0 comments on commit 2f82f5e

Please sign in to comment.