-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] event_track_multi_speaker #400
Open
victor-champonnois
wants to merge
12
commits into
OCA:16.0
Choose a base branch
from
coopiteasy:16.0-add-event_track_multi_speaker
base: 16.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0a67f6c
[ADD] event_track_multi_speaker
victor-champonnois 00a76c4
[FIX] compute and add constraints
victor-champonnois 8083fe4
[IMP] search by event in speaker tree
victor-champonnois 15390cf
[FIX] link to tracks and partner
victor-champonnois d626add
[IMP] edit biography on partner form
victor-champonnois f78c240
[ADD] default status
victor-champonnois 533b381
[FIX] compute method
victor-champonnois 44fb899
[FIX] e_t_multi_speaker: security and category
remytms f2a9e9c
[ADD] e_t_multi_speaker: add filter on my speakers
remytms 1344421
[FIX] e_t_multi_speaker: fix wrong copyright
remytms 6c0c795
[FIX] e_t_multi_speaker: menu access
remytms ba71203
[ADD] e_t_multi_speaker: french translation
remytms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
========================= | ||
Event Track Multi Speaker | ||
========================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:b68a380bf957a04f6f20f29ec5d8d1c62121548ca3853a7735dc98e82229043a | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fevent-lightgray.png?logo=github | ||
:target: https://github.com/OCA/event/tree/16.0/event_track_multi_speaker | ||
:alt: OCA/event | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/event-16-0/event-16-0-event_track_multi_speaker | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/event&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Allow for several speaker on event tracks | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/event/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/event/issues/new?body=module:%20event_track_multi_speaker%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Coop IT Easy SC | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Coop IT Easy SC <https://coopiteasy.be>`_: | ||
|
||
* Victor Champonnois | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-victor-champonnois| image:: https://github.com/victor-champonnois.png?size=40px | ||
:target: https://github.com/victor-champonnois | ||
:alt: victor-champonnois | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-victor-champonnois| | ||
|
||
This module is part of the `OCA/event <https://github.com/OCA/event/tree/16.0/event_track_multi_speaker>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
{ | ||
"name": "Event Track Multi Speaker", | ||
"summary": """ | ||
Allow for several speaker on event tracks""", | ||
"version": "16.0.1.0.0", | ||
"category": "Uncategorized", | ||
"website": "https://github.com/OCA/event", | ||
"author": "Coop IT Easy SC, Odoo Community Association (OCA)", | ||
"maintainers": ["victor-champonnois"], | ||
"license": "AGPL-3", | ||
"application": False, | ||
"depends": ["website_event_track"], | ||
"excludes": [], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/event_track.xml", | ||
"views/event_track_speaker.xml", | ||
"views/res_partner.xml", | ||
"views/menuitems.xml", | ||
], | ||
"demo": [], | ||
"qweb": [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import event_track | ||
from . import event_track_speaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2017 David Vidal<[email protected]> | ||
# Copyright 2017 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class EventTrack(models.Model): | ||
_inherit = "event.track" | ||
|
||
speaker_ids = fields.Many2many( | ||
comodel_name="event.track.speaker", string="Speakers" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2017 David Vidal<[email protected]> | ||
# Copyright 2017 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, api, fields, models | ||
from odoo.exceptions import UserError | ||
|
||
|
||
class EventTrackSpeaker(models.Model): | ||
_name = "event.track.speaker" | ||
_description = "Track Speaker" | ||
_inherit = ["mail.thread", "mail.activity.mixin"] | ||
|
||
name = fields.Char(related="partner_id.name") | ||
email = fields.Char(related="partner_id.email") | ||
phone = fields.Char(related="partner_id.phone") | ||
biography = fields.Html(related="partner_id.website_description") | ||
function = fields.Char(related="partner_id.function") | ||
image = fields.Image(related="partner_id.image_256") | ||
partner_id = fields.Many2one("res.partner", string="Contact") | ||
track_ids = fields.Many2many( | ||
comodel_name="event.track", | ||
string="Tracks", | ||
) | ||
status = fields.Selection( | ||
selection=[ | ||
("draft", "Draft"), | ||
("waiting", "Waiting"), | ||
("validated", "Validated"), | ||
], | ||
default="draft", | ||
) | ||
event_id = fields.Many2one( | ||
"event.event", compute="_compute_event", string="Event", store=True | ||
) | ||
|
||
@api.depends("track_ids.event_id") | ||
def _compute_event(self): | ||
if self.track_ids: | ||
self.event_id = self.track_ids[0].event_id | ||
|
||
@api.constrains("track_ids") | ||
def _check_unique_event(self): | ||
for speaker in self: | ||
if len(speaker.mapped("track_ids").mapped("event_id")) > 1: | ||
raise UserError(_("Speakers should belong to only one event.")) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Coop IT Easy SC <https://coopiteasy.be>`_: | ||
|
||
* Victor Champonnois |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Allow for several speaker on event tracks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_event_track_speaker,event.track.speaker.user,event_track_multi_speaker.model_event_track_speaker,event.group_event_user,1,1,1,1 | ||
This comment was marked as outdated.
Sorry, something went wrong. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as outdated.
Sorry, something went wrong.