summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-08-29 10:41:07 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-08-29 10:41:07 +0700
commit349ddaed037e2a9eec7b96d31536924abd5601ed (patch)
tree354465bfa40f702652668f70894c3c944499b585 /indoteknik_custom/models
parentc3d42480e83f466f847bb0e8c051f45257de5cd2 (diff)
Menambahkan thumbnail blog dan mengubah group attr SEO Blog
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/__init__.py1
-rw-r--r--indoteknik_custom/models/blog_post.py11
2 files changed, 12 insertions, 0 deletions
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)