summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/blog_post.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-08-29 03:42:50 +0000
committerIT Fixcomart <it@fixcomart.co.id>2022-08-29 03:42:50 +0000
commita20c3840b991dd910202e91ab44236e8db667816 (patch)
treeb76ac83bcddfeb9f42e38a04227febbd26c47eaa /indoteknik_custom/models/blog_post.py
parenta28e01d3df18301057c33930b11655cc9d623b64 (diff)
parent349ddaed037e2a9eec7b96d31536924abd5601ed (diff)
Merged in development (pull request #3)
Menambahkan thumbnail blog dan mengubah group attr SEO Blog
Diffstat (limited to 'indoteknik_custom/models/blog_post.py')
-rw-r--r--indoteknik_custom/models/blog_post.py11
1 files changed, 11 insertions, 0 deletions
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)