diff --git a/insta_feed_snippet/README.rst b/insta_feed_snippet/README.rst new file mode 100644 index 000000000..0e35305ea --- /dev/null +++ b/insta_feed_snippet/README.rst @@ -0,0 +1,44 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Insta Feed Snippet +================== + +Insta Feed Snippet + +Installation +============ +- www.odoo.com/documentation/15.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + vishnu@cybrosys.info + Version 15.0.0.0.0: + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/insta_feed_snippet/__init__.py b/insta_feed_snippet/__init__.py new file mode 100644 index 000000000..f7209b171 --- /dev/null +++ b/insta_feed_snippet/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import controllers diff --git a/insta_feed_snippet/__manifest__.py b/insta_feed_snippet/__manifest__.py new file mode 100644 index 000000000..3f5bb63a0 --- /dev/null +++ b/insta_feed_snippet/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Instagram Feed Snippet', + 'version': '15.0.1.0.0', + 'summary': 'Instagram Feed Snippet', + 'description': """Instagram Feed Snippet""", + 'category': 'Website', + 'author': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'license': 'LGPL-3', + 'depends': ['base', 'product', 'website', 'website_sale', 'sale'], + 'data': ['security/ir.model.access.csv', + 'views/insta_post.xml', + 'views/insta_profile.xml', + 'views/snippet_structure_inherit.xml', + 'views/website.xml' + ], + 'installable': True, + 'application': True, + 'auto_install': False, + 'assets': { + 'web.assets_frontend': [ + '/insta_feed_snippet/static/src/image/carousel.jpg', + 'insta_feed_snippet/static/src/js/caroursel.js', + ], + }, +} diff --git a/insta_feed_snippet/controllers/__init__.py b/insta_feed_snippet/controllers/__init__.py new file mode 100644 index 000000000..deec4a8b8 --- /dev/null +++ b/insta_feed_snippet/controllers/__init__.py @@ -0,0 +1 @@ +from . import main \ No newline at end of file diff --git a/insta_feed_snippet/controllers/main.py b/insta_feed_snippet/controllers/main.py new file mode 100644 index 000000000..66d035fcd --- /dev/null +++ b/insta_feed_snippet/controllers/main.py @@ -0,0 +1,30 @@ +from odoo import http +from odoo.http import request +import time + + +class DashbaordCarousel(http.Controller): + @http.route('/get_dashbaord_carousel', auth="public", type='json') + def get_dashbaord_carousel(self): + events_per_slide = 3 + records = request.env['insta.post'].sudo().search( + []) + records_grouped = [] + record_list = [] + for index, record in enumerate(records, 1): + record_list.append(record) + if index % events_per_slide == 0: + records_grouped.append(record_list) + record_list = [] + if any(record_list): + records_grouped.append(record_list) + values = { + "objects": records_grouped, + "events_per_slide": events_per_slide, + "num_slides": len(records_grouped), + "uniqueId": "pc-%d" % int(time.time() * 1000), + } + print(len(records_grouped)) + response = http.Response( + template='insta_feed_snippet.s_carousel_template_items', qcontext=values) + return response.render() diff --git a/insta_feed_snippet/doc/RELEASE_NOTES.md b/insta_feed_snippet/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..da707eca6 --- /dev/null +++ b/insta_feed_snippet/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 09.11.2022 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit + diff --git a/insta_feed_snippet/models/__init__.py b/insta_feed_snippet/models/__init__.py new file mode 100644 index 000000000..c70d72b19 --- /dev/null +++ b/insta_feed_snippet/models/__init__.py @@ -0,0 +1,2 @@ +from . import insta_profile +from . import insta_post diff --git a/insta_feed_snippet/models/insta_post.py b/insta_feed_snippet/models/insta_post.py new file mode 100644 index 000000000..caf4bcd5b --- /dev/null +++ b/insta_feed_snippet/models/insta_post.py @@ -0,0 +1,27 @@ +from odoo import models, fields, api, _ +import requests + +from odoo.exceptions import UserError + + +class InstaPost(models.Model): + _name = 'insta.post' + + name = fields.Char(string="Media ID") + caption = fields.Char("Caption") + post_image = fields.Binary(string='Post Image', attachment=True) + profile_id = fields.Many2one('insta.profile') + + def action_update_post(self, access_token): + + url = 'https://graph.facebook.com/v15.0/%s?fields=id,caption,comments_count,is_comment_enabled,like_count,media_product_type,media_type,media_url,owner,permalink,thumbnail_url,timestamp,username&access_token=%s' % ( + self.name, access_token) + media_content = requests.get(url, timeout=5).json() + if not media_content.get('error'): + if media_content.get('caption'): + self.write({ + 'caption': media_content['caption'], + + }) + else: + raise UserError(_('%s', media_content['error']['message'])) diff --git a/insta_feed_snippet/models/insta_profile.py b/insta_feed_snippet/models/insta_profile.py new file mode 100644 index 000000000..b1f0df361 --- /dev/null +++ b/insta_feed_snippet/models/insta_profile.py @@ -0,0 +1,81 @@ +import base64 +from odoo import models, fields, api, _ +import requests + +from odoo.exceptions import UserError + + +class InstaProfile(models.Model): + _name = 'insta.profile' + + name = fields.Char(string="Name", readonly=True) + access_token = fields.Text("Access Token") + username = fields.Char('Username', readonly=True) + account_id = fields.Char('Account ID', readonly=True) + profile_image_url = fields.Binary(attachment=True) + + def action_fetch(self): + url = 'https://graph.facebook.com/v15.0/me/accounts?access_token=%s' % self.access_token + page = requests.get(url) + page_content = page.json() + if not page_content.get('error'): + if page_content['data'][0]['id']: + url = 'https://graph.facebook.com/v14.0/%s?fields=instagram_business_account&access_token=%s' % ( + page_content['data'][0]['id'], self.access_token) + business_account = requests.get(url) + instagram_business_account = business_account.json()['instagram_business_account']['id'] + url = 'https://graph.facebook.com/v15.0/%s?fields=name,username,biography,website,followers_count,follows_count,media_count,profile_picture_url&access_token=%s' % ( + instagram_business_account, self.access_token) + val = requests.get(url) + content = val.json() + if content.get('name'): + self.name = content['name'] + if content.get('username'): + self.username = content['username'] + if content.get('id'): + self.account_id = content['id'] + if content.get('profile_picture_url'): + img = base64.b64encode(requests.get(content['profile_picture_url']).content) + self.profile_image_url = img + + else: + raise UserError(_('%s', page_content['error']['message'])) + + def action_get_post(self): + url = 'https://graph.facebook.com/v15.0/%s/media?access_token=%s' % (self.account_id, self.access_token) + content = requests.get(url, timeout=5).json() + if not content.get('error'): + post_list = [] + records = self.env['insta.post'].search([]) + for post in records: + post_list.append(post.name) + if content.get('data'): + for vals in content['data']: + if vals['id'] not in post_list: + url = 'https://graph.facebook.com/v14.0/%s?fields=id,caption,comments_count,is_comment_enabled,like_count,media_product_type,media_type,media_url,owner,permalink,thumbnail_url,timestamp,username&access_token=%s' % ( + vals['id'], self.access_token) + media_content = requests.get(url, timeout=5).json() + + if media_content.get('media_type'): + if media_content['media_type'] == 'IMAGE': + res = self.env['insta.post'].create({ + 'name': media_content['id'], + 'profile_id':self.id, + }) + + image_data = base64.b64encode(requests.get(media_content['media_url']).content) + res.write({ + + 'post_image': image_data, + }) + if media_content.get('caption'): + res.write({ + 'caption': media_content['caption'], + + }) + + else: + record = self.env['insta.post'].search([('name', '=', vals['id'])]) + record.action_update_post(self.access_token) + else: + raise UserError(_('%s', content['error']['message'])) diff --git a/insta_feed_snippet/security/ir.model.access.csv b/insta_feed_snippet/security/ir.model.access.csv new file mode 100644 index 000000000..2d8fb6c49 --- /dev/null +++ b/insta_feed_snippet/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +insta_profile_id,insta.profile.name,model_insta_profile,,1,1,1,1 +insta_post_id,insta.post.name,model_insta_post,,1,1,1,1 + diff --git a/insta_feed_snippet/static/description/assets/icons/check.png b/insta_feed_snippet/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/check.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/chevron.png b/insta_feed_snippet/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/chevron.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/cogs.png b/insta_feed_snippet/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/cogs.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/consultation.png b/insta_feed_snippet/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/consultation.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/ecom-black.png b/insta_feed_snippet/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/ecom-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/education-black.png b/insta_feed_snippet/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/education-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/hotel-black.png b/insta_feed_snippet/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/hotel-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/insta_feed_snippet_icon.png b/insta_feed_snippet/static/description/assets/icons/insta_feed_snippet_icon.png new file mode 100644 index 000000000..9af668a31 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/insta_feed_snippet_icon.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/license.png b/insta_feed_snippet/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/license.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/lifebuoy.png b/insta_feed_snippet/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/lifebuoy.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/logo.png b/insta_feed_snippet/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/logo.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/manufacturing-black.png b/insta_feed_snippet/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/manufacturing-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/pos-black.png b/insta_feed_snippet/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/pos-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/puzzle.png b/insta_feed_snippet/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/puzzle.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/restaurant-black.png b/insta_feed_snippet/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/restaurant-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/service-black.png b/insta_feed_snippet/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/service-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/trading-black.png b/insta_feed_snippet/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/trading-black.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/training.png b/insta_feed_snippet/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/training.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/update.png b/insta_feed_snippet/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/update.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/user.png b/insta_feed_snippet/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/user.png differ diff --git a/insta_feed_snippet/static/description/assets/icons/wrench.png b/insta_feed_snippet/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/insta_feed_snippet/static/description/assets/icons/wrench.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/categories.png b/insta_feed_snippet/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/categories.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/check-box.png b/insta_feed_snippet/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/check-box.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/compass.png b/insta_feed_snippet/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/compass.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/corporate.png b/insta_feed_snippet/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/corporate.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/customer-support.png b/insta_feed_snippet/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/customer-support.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/cybrosys-logo.png b/insta_feed_snippet/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/cybrosys-logo.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/features.png b/insta_feed_snippet/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/features.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/logo.png b/insta_feed_snippet/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/logo.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/pictures.png b/insta_feed_snippet/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/pictures.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/pie-chart.png b/insta_feed_snippet/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/pie-chart.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/right-arrow.png b/insta_feed_snippet/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/right-arrow.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/star.png b/insta_feed_snippet/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/star.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/support.png b/insta_feed_snippet/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/support.png differ diff --git a/insta_feed_snippet/static/description/assets/misc/whatsapp.png b/insta_feed_snippet/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/misc/whatsapp.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/1.png b/insta_feed_snippet/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/1.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/2.png b/insta_feed_snippet/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/2.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/3.png b/insta_feed_snippet/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/3.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/4.png b/insta_feed_snippet/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/4.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/5.gif b/insta_feed_snippet/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/5.gif differ diff --git a/insta_feed_snippet/static/description/assets/modules/6.png b/insta_feed_snippet/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/6.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/budget_image.png b/insta_feed_snippet/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/budget_image.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/credit_image.png b/insta_feed_snippet/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/credit_image.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/employee_image.png b/insta_feed_snippet/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/employee_image.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/export_image.png b/insta_feed_snippet/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/export_image.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/gantt_image.png b/insta_feed_snippet/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/gantt_image.png differ diff --git a/insta_feed_snippet/static/description/assets/modules/quotation_image.png b/insta_feed_snippet/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/insta_feed_snippet/static/description/assets/modules/quotation_image.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/hero.gif b/insta_feed_snippet/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..52183da2d Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/hero.gif differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/in_1.png b/insta_feed_snippet/static/description/assets/screenshots/in_1.png new file mode 100644 index 000000000..436c8fa92 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/in_1.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/in_2.png b/insta_feed_snippet/static/description/assets/screenshots/in_2.png new file mode 100644 index 000000000..ef45ee585 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/in_2.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/in_3.png b/insta_feed_snippet/static/description/assets/screenshots/in_3.png new file mode 100644 index 000000000..0a0eecd40 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/in_3.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/in_4.png b/insta_feed_snippet/static/description/assets/screenshots/in_4.png new file mode 100644 index 000000000..49d52373d Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/in_4.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/in_5.png b/insta_feed_snippet/static/description/assets/screenshots/in_5.png new file mode 100644 index 000000000..4cca0c1de Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/in_5.png differ diff --git a/insta_feed_snippet/static/description/banner.png b/insta_feed_snippet/static/description/banner.png new file mode 100644 index 000000000..94318a840 Binary files /dev/null and b/insta_feed_snippet/static/description/banner.png differ diff --git a/insta_feed_snippet/static/description/icon.png b/insta_feed_snippet/static/description/icon.png new file mode 100644 index 000000000..f29fe2ff4 Binary files /dev/null and b/insta_feed_snippet/static/description/icon.png differ diff --git a/insta_feed_snippet/static/description/index.html b/insta_feed_snippet/static/description/index.html new file mode 100644 index 000000000..bb1856df4 --- /dev/null +++ b/insta_feed_snippet/static/description/index.html @@ -0,0 +1,592 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Instagram Feed snippet

+

+ A Module For Instagram Feed Snippet +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ As we all know, Instagram is one of the most used and popular social networking sites all over the + world. With approx. 1 billion monthly active users on Instagram, it is a perfect way to reach out to + potential users + easily. Adding your Instagram profile option on your Odoo website enables you to promote your website + products + on Instagram. The Odoo Instagram Feed Snippet module provides a feature to add an Instagram feed in + Odoo.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ The Odoo Instagram Feed Snippet module provides a feature to add an Instagram feed in Odoo

+
+
+ +
+
+ +
+
+

+ You can simply drag and drop Instagram snippets on any page of your website to show your Instagram + feed.

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Website Backend

+

+ Once the installation + is completed, visit the Odoo website app from the backend. Here, click on Configuration>>Instagram.You + can set up your instagram profile by adding access key and click fetch account button.Once the profile + is generated click the fetch post button to fetch instagram post into odoo

+ +
+ +
+

+ Profile

+

+ +

+ +
+ +
+

+ Instagram Posts

+ +
+ + +
+

+ Website Frontend

+ In Odoo website frontend click on the Edit option.After that, select the Instagram widget and drag it + to the place where you want to showcase it on your Odoo website frontend, and click on the Save + button.

+ +
+ + +
+

After that, once you + save it, the Instagram widget will let you show your Instagram feed on your Odoo website as shown + below.

+ +
+ + +
+ +
+
+

Suggested Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/insta_feed_snippet/static/src/css/owl.carousel.min.css b/insta_feed_snippet/static/src/css/owl.carousel.min.css new file mode 100644 index 000000000..a71df11c0 --- /dev/null +++ b/insta_feed_snippet/static/src/css/owl.carousel.min.css @@ -0,0 +1,6 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} \ No newline at end of file diff --git a/insta_feed_snippet/static/src/css/owl.theme.default.min.css b/insta_feed_snippet/static/src/css/owl.theme.default.min.css new file mode 100644 index 000000000..487088d2e --- /dev/null +++ b/insta_feed_snippet/static/src/css/owl.theme.default.min.css @@ -0,0 +1,6 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +.owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} \ No newline at end of file diff --git a/insta_feed_snippet/static/src/image/carousel.png b/insta_feed_snippet/static/src/image/carousel.png new file mode 100644 index 000000000..b08c3d1df Binary files /dev/null and b/insta_feed_snippet/static/src/image/carousel.png differ diff --git a/insta_feed_snippet/static/src/js/caroursel.js b/insta_feed_snippet/static/src/js/caroursel.js new file mode 100644 index 000000000..714baa2ee --- /dev/null +++ b/insta_feed_snippet/static/src/js/caroursel.js @@ -0,0 +1,23 @@ +odoo.define('insta_feed_snippet.carousel_dashboard', function(require){ + 'use strict'; + var Animation = require('website.content.snippets.animation'); + var ajax = require('web.ajax'); + + Animation.registry.get_dashbaord_carousel = Animation.Class.extend({ + selector : '.s_carousel_template', + init: function() { + this._super.apply(this, arguments); + console.log("Init loaded"); + }, + start: function(){ + console.log("Test"); + var self = this; + ajax.jsonRpc('/get_dashbaord_carousel', 'call', {}) + .then(function (data) { + if(data){ + self.$target.empty().append(data); + } + }); + } + }); +}); diff --git a/insta_feed_snippet/static/src/js/custom.js b/insta_feed_snippet/static/src/js/custom.js new file mode 100644 index 000000000..c61ec6880 --- /dev/null +++ b/insta_feed_snippet/static/src/js/custom.js @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/insta_feed_snippet/views/insta_post.xml b/insta_feed_snippet/views/insta_post.xml new file mode 100644 index 000000000..e0b1cbb32 --- /dev/null +++ b/insta_feed_snippet/views/insta_post.xml @@ -0,0 +1,85 @@ + + + + + + insta.post.kanban + insta.post + + + + + +
+
+ + +
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+ + insta.post.form + insta.post + +
+ +
+
+

+ + + + +

+
+
+
+ +
+
+
+ + insta.post.tree + insta.post + + + + + + + + insta.post.search + insta.post + + + + + + + + + Instagram Posts + insta.post + kanban,tree,form + + + + +
\ No newline at end of file diff --git a/insta_feed_snippet/views/insta_profile.xml b/insta_feed_snippet/views/insta_profile.xml new file mode 100644 index 000000000..57a019c3b --- /dev/null +++ b/insta_feed_snippet/views/insta_profile.xml @@ -0,0 +1,119 @@ + + + + insta.profile.form + insta.profile + +
+ +
+ +
+ + +
+

+ +

+
+
+
+ + + + + + +
+
+
+
+
+
+ + insta.profile.form + insta.profile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/insta_feed_snippet/views/snippet_structure_inherit.xml b/insta_feed_snippet/views/snippet_structure_inherit.xml new file mode 100644 index 000000000..638619150 --- /dev/null +++ b/insta_feed_snippet/views/snippet_structure_inherit.xml @@ -0,0 +1,86 @@ + + + + + + + + + \ No newline at end of file diff --git a/insta_feed_snippet/views/website.xml b/insta_feed_snippet/views/website.xml new file mode 100644 index 000000000..3b5fcf280 --- /dev/null +++ b/insta_feed_snippet/views/website.xml @@ -0,0 +1,17 @@ + + + + + Insta profile + ir.actions.act_window + kanban,tree,form + insta.profile + + + \ No newline at end of file