From 349ddaed037e2a9eec7b96d31536924abd5601ed Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Mon, 29 Aug 2022 10:41:07 +0700 Subject: Menambahkan thumbnail blog dan mengubah group attr SEO Blog --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/blog_post.py | 11 +++++++++++ indoteknik_custom/views/blog_post.xml | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 indoteknik_custom/models/blog_post.py create mode 100644 indoteknik_custom/views/blog_post.xml diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 25341923..41c0b184 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -19,3 +19,4 @@ from . import sale_monitoring_detail from . import sale_monitoring from . import account_move from . import account_asset +from . import blog_post diff --git a/indoteknik_custom/models/blog_post.py b/indoteknik_custom/models/blog_post.py new file mode 100644 index 00000000..27f0c125 --- /dev/null +++ b/indoteknik_custom/models/blog_post.py @@ -0,0 +1,11 @@ +from odoo import models, fields + + +class BlogPost(models.Model): + _inherit = 'blog.post' + + thumbnail = fields.Binary(string="Thumbnail") + thumbnail_128 = fields.Image("Thumbnail 128", related="thumbnail", max_width=128, max_height=128, store=True) + thumbnail_256 = fields.Image("Thumbnail 256", related="thumbnail", max_width=256, max_height=256, store=True) + thumbnail_512 = fields.Image("Thumbnail 512", related="thumbnail", max_width=512, max_height=512, store=True) + thumbnail_1024 = fields.Image("Thumbnail 1024", related="thumbnail", max_width=1024, max_height=1024, store=True) diff --git a/indoteknik_custom/views/blog_post.xml b/indoteknik_custom/views/blog_post.xml new file mode 100644 index 00000000..0acf6aa5 --- /dev/null +++ b/indoteknik_custom/views/blog_post.xml @@ -0,0 +1,18 @@ + + + + + Blog Posts + blog.post + + + + + + + website.group_website_designer + + + + + \ No newline at end of file -- cgit v1.2.3