Skip to content

Commit

Permalink
[ADD] primevere_e_c: event.track.theme
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Sep 18, 2024
1 parent 9acd07a commit 07bcec0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions primevere_event_custom/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"excludes": [],
"data": [
"security/ir.model.access.csv",
"views/event_track_speaker.xml",
"views/event_track.xml",
"views/event_track_speaker_booking.xml",
Expand Down
1 change: 1 addition & 0 deletions primevere_event_custom/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from . import event_track
from . import event_track_speaker_travel_booking
from . import event_track_speaker_travel_expense
from . import event_track_theme
1 change: 1 addition & 0 deletions primevere_event_custom/models/event_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class EventTrack(models.Model):
_inherit = "event.track"

theme_ids = fields.Many2many("event.track.theme", string="Themes")
commission_summary = fields.Text()
information = fields.Text()
contacts = fields.Text()
Expand Down
11 changes: 11 additions & 0 deletions primevere_event_custom/models/event_track_theme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from odoo import fields, models


class EventTrackTheme(models.Model):
_name = "event.track.theme"

name = fields.Char()
3 changes: 3 additions & 0 deletions primevere_event_custom/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_event_track_theme_registration,event.track.theme.registration,primevere_event_custom.model_event_track_theme,event.group_event_registration_desk,1,0,0,0
access_event_track_theme_user,event.track.theme.user,primevere_event_custom.model_event_track_theme,event.group_event_user,1,1,1,1
4 changes: 4 additions & 0 deletions primevere_event_custom/views/event_track.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<field name="inherit_id" ref="website_event_track.view_event_track_form" />
<field name="arch" type="xml">

<field name="color" position="after">
<field name="theme_ids" widget="many2many_tags" />
</field>

<field name="date" position="after">
<field name="all_event" />
</field>
Expand Down

0 comments on commit 07bcec0

Please sign in to comment.