From 2bc877dcbe21138451a65aa00f75f2ca240b0e4a Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 4 Jan 2023 11:04:01 +0700 Subject: add window website channel and website content --- indoteknik_custom/models/website_content.py | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 indoteknik_custom/models/website_content.py (limited to 'indoteknik_custom/models/website_content.py') diff --git a/indoteknik_custom/models/website_content.py b/indoteknik_custom/models/website_content.py new file mode 100644 index 00000000..e94076f8 --- /dev/null +++ b/indoteknik_custom/models/website_content.py @@ -0,0 +1,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') + ]) -- cgit v1.2.3