Skip to content

Commit

Permalink
Disable default partner_ids during calendar event creation
Browse files Browse the repository at this point in the history
  • Loading branch information
moctarjallo committed Nov 30, 2023
1 parent 7747716 commit 6a8ae33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions hr_holidays_public/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from . import hr_leave_type
from . import hr_holidays_public
from . import resource_calendar
from . import calendar_event
13 changes: 13 additions & 0 deletions hr_holidays_public/models/calendar_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2023 XCG-CONSULTING - Moctar Diallo <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class CalendarEvent(models.Model):
_inherit = "calendar.event"

def default_get(self, fields_list):
defaults = super().default_get(fields_list)
defaults["partner_ids"] = False
return defaults

0 comments on commit 6a8ae33

Please sign in to comment.