Skip to content
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

[16.0] [ADD] event_track_equipment #393

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions event_track_equipment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
======================
Event Track Equipments
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0d2b275e6036dd25a6e5507577ac20bace7da2d3d126ac2d8f11bbf0df7edf6e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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_equipment
: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_equipment
: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|

Set necessary equipments for 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_equipment%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.

This module is part of the `OCA/event <https://github.com/OCA/event/tree/16.0/event_track_equipment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions event_track_equipment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions event_track_equipment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2017-19 David Vidal<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Event Track Equipments",
"version": "16.0.1.0.0",
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/event",
"category": "Marketing",
"summary": "Set necessary equipments for tracks",
"depends": ["website_event_track"],
"data": [
"security/ir.model.access.csv",
"views/event_track.xml",
"views/event_track_equipment.xml",
],
"installable": True,
}
3 changes: 3 additions & 0 deletions event_track_equipment/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import event_track
from . import event_track_equipment
from . import event_track_equipment_line
13 changes: 13 additions & 0 deletions event_track_equipment/models/event_track.py
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 EventTrackSession(models.Model):
_inherit = "event.track"

equipment_line_ids = fields.One2many(
"event.track.equipment.line", "track_id", string="Equipments"
)
12 changes: 12 additions & 0 deletions event_track_equipment/models/event_track_equipment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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 EventTrackEquipment(models.Model):
_name = "event.track.equipment"
_description = "Track Equipments"

name = fields.Char()
23 changes: 23 additions & 0 deletions event_track_equipment/models/event_track_equipment_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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 EventTrackEquipmentLine(models.Model):
_name = "event.track.equipment.line"
_description = "Track Equipments Line"

track_id = fields.Many2one("event.track", string="Track")
equipment_id = fields.Many2one("event.track.equipment", string="Equipment")
quantity = fields.Integer(default=1)

_sql_constraints = [
(
"event_track_equipment_line_equipment_uniq",
"unique (track_id, equipment_id)",
"Duplicate equipments on a track is not allowed, modify "
"quantity of existing line.",
)
]
3 changes: 3 additions & 0 deletions event_track_equipment/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Victor Champonnois
1 change: 1 addition & 0 deletions event_track_equipment/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set necessary equipments for Event Tracks.
5 changes: 5 additions & 0 deletions event_track_equipment/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_event_track_equipment_registration,event.track.equipment.user,event_track_equipment.model_event_track_equipment,event.group_event_registration_desk,1,0,0,0
access_event_track_equipment_user,event.track.equipment.user,event_track_equipment.model_event_track_equipment,event.group_event_user,1,1,1,1
access_event_track_equipment_line_registration,event.track.equipment.line.user,event_track_equipment.model_event_track_equipment_line,event.group_event_registration_desk,1,0,0,0
access_event_track_equipment_line_user,event.track.equipment.line.user,event_track_equipment.model_event_track_equipment_line,event.group_event_user,1,1,1,1
Binary file added event_track_equipment/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading