summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-01-04 11:04:01 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-01-04 11:04:01 +0700
commit2bc877dcbe21138451a65aa00f75f2ca240b0e4a (patch)
tree7ce762a7f9aa7df11f667215db9227dd2cfdff2e /indoteknik_custom/models
parent69c476bba84a7cb2b33e8b45bc1ea7d140333b2f (diff)
add window website channel and website content
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/__init__.py1
-rw-r--r--indoteknik_custom/models/website_content.py34
2 files changed, 35 insertions, 0 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py
index 1190e7d0..d7d3e03c 100755
--- a/indoteknik_custom/models/__init__.py
+++ b/indoteknik_custom/models/__init__.py
@@ -40,3 +40,4 @@ from . import product_spec
from . import purchase_outstanding
from . import sales_outstanding
from . import customer_review
+from . import website_content
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')
+ ])