[NEW] event_track_copy
This commit is contained in:
1
event_track_copy/__init__.py
Normal file
1
event_track_copy/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
21
event_track_copy/__manifest__.py
Normal file
21
event_track_copy/__manifest__.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2016-2020 Akretion France (<https://www.akretion.com>)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Event track copy",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"author": "Elabore",
|
||||||
|
"website": "https://www.elabore.coop",
|
||||||
|
"category": "",
|
||||||
|
'summary': 'Copy website event tracks when copy event',
|
||||||
|
'description': """Copy website event tracks when copy event
|
||||||
|
|
||||||
|
""",
|
||||||
|
"depends": ["website_event_track"],
|
||||||
|
"data": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"installable": True,
|
||||||
|
}
|
2
event_track_copy/models/__init__.py
Normal file
2
event_track_copy/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from . import event_track
|
||||||
|
from . import event_event
|
9
event_track_copy/models/event_event.py
Normal file
9
event_track_copy/models/event_event.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
from odoo import fields, models, api, Command
|
||||||
|
import logging
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
class EventEvent(models.Model):
|
||||||
|
_inherit = "event.event"
|
||||||
|
|
||||||
|
track_ids = fields.One2many(copy=True) #enable copy for event tracks
|
12
event_track_copy/models/event_track.py
Normal file
12
event_track_copy/models/event_track.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
from odoo import fields, models, api, Command
|
||||||
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class EventTrack(models.Model):
|
||||||
|
_inherit = "event.track"
|
||||||
|
|
||||||
|
event_id = fields.Many2one(ondelete='cascade') #delete event tracks when delete event
|
Reference in New Issue
Block a user