|
@ -2,16 +2,33 @@ from odoo import models, fields, api |
|
|
from odoo.exceptions import UserError, ValidationError,Warning |
|
|
from odoo.exceptions import UserError, ValidationError,Warning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class event_media_session(models.Model): |
|
|
|
|
|
_name = 'event.media.session' |
|
|
|
|
|
_description = 'event media session' |
|
|
|
|
|
|
|
|
|
|
|
sequence = fields.Integer(string='Session') |
|
|
|
|
|
description=fields.Char('Description') |
|
|
|
|
|
event_id=fields.Many2one('event.event') |
|
|
|
|
|
media_link_ids=fields.One2many( |
|
|
|
|
|
'event.media.link', |
|
|
|
|
|
'media_session_id', |
|
|
|
|
|
string='Media link' |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
class event_media_link(models.Model): |
|
|
class event_media_link(models.Model): |
|
|
_name = 'event.media.link' |
|
|
_name = 'event.media.link' |
|
|
_description = 'event media link' |
|
|
_description = 'event media link' |
|
|
|
|
|
|
|
|
|
|
|
session_id=fields.Many2one('media.session') |
|
|
date_recording = fields.Date('Recording date') |
|
|
date_recording = fields.Date('Recording date') |
|
|
start_time_recording = fields.Float('Recording start time') |
|
|
start_time_recording = fields.Float('Recording start time') |
|
|
link = fields.Char('Link') |
|
|
|
|
|
|
|
|
link_fr = fields.Char('FR Link') |
|
|
|
|
|
link_en = fields.Char('EN Link') |
|
|
format_recording =fields.Selection(string='Format',selection=[('audio','audio'),('video','video')],required=True, default='video') |
|
|
format_recording =fields.Selection(string='Format',selection=[('audio','audio'),('video','video')],required=True, default='video') |
|
|
duration=fields.Float('Duration') |
|
|
duration=fields.Float('Duration') |
|
|
description=fields.Char('Description') |
|
|
description=fields.Char('Description') |
|
|
event_id=fields.Many2one('event.event') |
|
|
|
|
|
|
|
|
media_session_id=fields.Many2one('event.media.session') |
|
|
|
|
|
#language=fields.Selection(string='Language',selection=[('fr','fr'),('en','en')]) |
|
|
|
|
|
|
|
|
|
|
|
|