diff --git a/social_sync/__init__.py b/social_sync/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/social_sync/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/social_sync/__manifest__.py b/social_sync/__manifest__.py new file mode 100644 index 0000000..40253ea --- /dev/null +++ b/social_sync/__manifest__.py @@ -0,0 +1,15 @@ + +{ + 'name': 'Social Media Sync', + 'version': '1.0', + 'summary': 'An example module to sync posts to social media.', + 'description': 'A simple custom module example for hackathon.', + 'author': 'Your Name', + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv', + 'views/social_sync_views.xml', + ], + 'installable': True, + 'application': True, +} diff --git a/social_sync/models/__init__.py b/social_sync/models/__init__.py new file mode 100644 index 0000000..c66a631 --- /dev/null +++ b/social_sync/models/__init__.py @@ -0,0 +1 @@ +from . import social_post diff --git a/social_sync/models/social_post.py b/social_sync/models/social_post.py new file mode 100644 index 0000000..5c179c8 --- /dev/null +++ b/social_sync/models/social_post.py @@ -0,0 +1,9 @@ + +from odoo import models, fields + +class SocialPost(models.Model): + _name = 'social.post' + _description = 'Social Media Post' + + name = fields.Char('Post Title') + content = fields.Text('Content') diff --git a/social_sync/security/ir.model.access.csv b/social_sync/security/ir.model.access.csv new file mode 100644 index 0000000..9d733a1 --- /dev/null +++ b/social_sync/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_social_post,social.post,model_social_post,,1,1,1,1 diff --git a/social_sync/views/social_sync_views.xml b/social_sync/views/social_sync_views.xml new file mode 100644 index 0000000..4dba46e --- /dev/null +++ b/social_sync/views/social_sync_views.xml @@ -0,0 +1,32 @@ + + + + social.post.tree + social.post + + + + + + + + + social.post.form + social.post + +
+ + + + +
+ + + Social Posts + social.post + tree,form + + + + +