diff --git a/insta_feed_snippet/README.rst b/insta_feed_snippet/README.rst new file mode 100644 index 000000000..0c97399a5 --- /dev/null +++ b/insta_feed_snippet/README.rst @@ -0,0 +1,45 @@ +.. 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 16.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..76b4c52fc --- /dev/null +++ b/insta_feed_snippet/__manifest__.py @@ -0,0 +1,51 @@ +# -*- 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': '16.0.0.0.0', + 'summary': 'Instagram Feed Snippet', + 'description': """The Odoo Instagram Feed Snippet module provides a feature to add an Instagram feed in Odoo.""", + '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' + ], + 'demo': [], + 'images': ['static/description/banner.png'], + '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..5e9a75f84 --- /dev/null +++ b/insta_feed_snippet/controllers/main.py @@ -0,0 +1,29 @@ +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), + } + response = http.Response( + template='insta_feed_snippet.s_carousel_template_items', qcontext=values) + return response.render() 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..ebf589fd1 --- /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.Char("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/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/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/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/screenshot-1.png b/insta_feed_snippet/static/description/assets/screenshots/screenshot-1.png new file mode 100644 index 000000000..9317d93a9 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/screenshot-1.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/screenshot-2.png b/insta_feed_snippet/static/description/assets/screenshots/screenshot-2.png new file mode 100644 index 000000000..b99526842 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/screenshot-2.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/screenshot-3.png b/insta_feed_snippet/static/description/assets/screenshots/screenshot-3.png new file mode 100644 index 000000000..4866099f9 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/screenshot-3.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/screenshot-4.png b/insta_feed_snippet/static/description/assets/screenshots/screenshot-4.png new file mode 100644 index 000000000..dc7ce5713 Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/screenshot-4.png differ diff --git a/insta_feed_snippet/static/description/assets/screenshots/screenshot-5.png b/insta_feed_snippet/static/description/assets/screenshots/screenshot-5.png new file mode 100644 index 000000000..39e0a7fae Binary files /dev/null and b/insta_feed_snippet/static/description/assets/screenshots/screenshot-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..7a9d3b1f6 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..32fb8b517 --- /dev/null +++ b/insta_feed_snippet/static/description/index.html @@ -0,0 +1,574 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

Instagram + Odoo Snippet

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

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. + +
+
+
+ +
+ Provides easy and Simple configuration. + +
+
+
+ +
+ 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

+ +
+ +
+

+

Goto the Site menu of + website to see the instagram posts.

+ +
+ +
+

+

You can see the + instagram post here.

+ +
+
+

Website Frontend

+

Visit the + Odoo websitefrontend and 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.

+ +
+
+

+ goes here

+

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

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

Related + 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

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ 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..e69de29bb 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..e69de29bb 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..3c303d435 --- /dev/null +++ b/insta_feed_snippet/static/src/js/caroursel.js @@ -0,0 +1,21 @@ +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); + }, + 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..5bd5b67e9 --- /dev/null +++ b/insta_feed_snippet/views/insta_post.xml @@ -0,0 +1,74 @@ + + + + + + insta.post.kanban + insta.post + + + + + +
+
+ + +
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+ + insta.post.form + insta.post + +
+ +
+
+

+ + + + +

+
+
+
+ +
+
+
+ + insta.post.tree + insta.post + + + + + + + + insta.post.search + insta.post + + + + + + + + +
\ 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..ba18b3e21 --- /dev/null +++ b/insta_feed_snippet/views/insta_profile.xml @@ -0,0 +1,49 @@ + + + + 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..f038996e2 --- /dev/null +++ b/insta_feed_snippet/views/snippet_structure_inherit.xml @@ -0,0 +1,84 @@ + + + + + + + + + \ 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..801bbb9ce --- /dev/null +++ b/insta_feed_snippet/views/website.xml @@ -0,0 +1,27 @@ + + + + Instagram Posts + insta.post + kanban,tree,form + + + + + Insta profile + ir.actions.act_window + kanban,tree,form + insta.profile + + + \ No newline at end of file