1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
from odoo import fields, models, api
import logging
_logger = logging.getLogger(__name__)
class WebsiteContent(models.Model):
_name = 'website.content'
sequence = fields.Integer(string='Sequence')
slide_type = fields.Selection([
('document', 'Document'),
('infographic', 'Infographic'),
('presentation', 'Presentation'),
('video', 'Video')
])
name = fields.Char(string='Name')
url = fields.Char(string='URL')
channel_id = fields.Many2one('website.content.channel', string='Channel')
status = fields.Selection([
('tayang', 'Tayang'),
('tidak_tayang', 'Tidak Tayang')
], string='Status')
class WebsiteContentChannel(models.Model):
_name = 'website.content.channel'
name = fields.Char(string='Name')
description_html = fields.Html('Description', sanitize_attributes=False, sanitize_form=False)
visibility = fields.Selection([
('public', 'Public'),
('internal', 'Internal')
])
|