diff --git a/recruitment_twitter/README.rst b/recruitment_twitter/README.rst new file mode 100755 index 000000000..2ac5dfdd6 --- /dev/null +++ b/recruitment_twitter/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +HR Recruitment Twitter Integration +================================== +This integration module makes your HR recruitment better. You can share your +Job positions directly to Twitter + +Configuration +============= +* Need to install python package tweepy. +* pip3 install tweepy + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V14) Mruthul Raj, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/recruitment_twitter/__init__.py b/recruitment_twitter/__init__.py new file mode 100644 index 000000000..e1b6fe167 --- /dev/null +++ b/recruitment_twitter/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models diff --git a/recruitment_twitter/__manifest__.py b/recruitment_twitter/__manifest__.py new file mode 100644 index 000000000..7e3183b5b --- /dev/null +++ b/recruitment_twitter/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'HR Recruitment Twitter Integration', + 'version': "14.0.1.0.0", + 'category': 'Extra Tools', + 'summary': """ Share Your Job Positions Directly to Twitter.""", + 'description': """This integration module makes your HR recruitment better. + You can share your Job positions directly to Twitter""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'depends': ['hr_recruitment', 'website'], + 'data': [ + "views/hr_job_views.xml", + "views/res_config_settings_views.xml" + ], + 'external_dependencies': { + 'python': ['tweepy'], + }, + 'images': ['static/description/banner.png'], + 'license': "AGPL-3", + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/recruitment_twitter/doc/RELEASE_NOTES.md b/recruitment_twitter/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..5b3e12dc5 --- /dev/null +++ b/recruitment_twitter/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.10.2023 +#### Version 14.0.1.0.0 +##### ADD +- Initial commit for HR Recruitment Twitter Integration diff --git a/recruitment_twitter/models/__init__.py b/recruitment_twitter/models/__init__.py new file mode 100644 index 000000000..13e5e0ec2 --- /dev/null +++ b/recruitment_twitter/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import hr_job +from . import res_config_settings diff --git a/recruitment_twitter/models/hr_job.py b/recruitment_twitter/models/hr_job.py new file mode 100644 index 000000000..30f136f6d --- /dev/null +++ b/recruitment_twitter/models/hr_job.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +import logging +import tweepy +from odoo import fields, models, _ +from odoo.exceptions import UserError +_logger = logging.getLogger(__name__) + + +class HrJob(models.Model): + """Post job position on Twitter""" + _inherit = 'hr.job' + + image_1920 = fields.Binary(string="Poster", attachment=True, + help="Upload image to post") + + def action_job_post(self): + """This function is to post job position on Twitter""" + job_post_url = str(self.get_base_url()) + str("/jobs/detail/") + str( + self.id) + consumer_key = self.env['ir.config_parameter'].get_param( + 'recruitment_twitter.consumer_key') + consumer_secret = self.env['ir.config_parameter'].get_param( + 'recruitment_twitter.consumer_secret') + access_token = self.env['ir.config_parameter'].get_param( + 'recruitment_twitter.access_token') + access_token_secret = self.env['ir.config_parameter'].get_param( + 'recruitment_twitter.access_token_secret') + if (consumer_key and consumer_secret and access_token and + access_token_secret): + client = tweepy.Client(consumer_key=consumer_key, + consumer_secret=consumer_secret, + access_token=access_token, + access_token_secret=access_token_secret) + attachment = self.env["ir.attachment"].search( + ['|', ('res_field', '!=', False), ('res_field', '=', False), + ('res_id', '=', self.id), + ('res_model', '=', 'hr.job')], limit=1) + file_path = attachment._full_path(attachment.store_fname) + try: + auth = tweepy.OAuth1UserHandler(consumer_key, + consumer_secret) + auth.set_access_token(access_token, access_token_secret) + tweepy_api = tweepy.API(auth) + media = tweepy_api.media_upload(file_path) + client.create_tweet(text=job_post_url, + media_ids=[media.media_id]) + message = { + 'type': 'success', + 'title': _('Success!'), + 'message': _('Posted successfully.'), + 'sticky': False, + } + return {'type': 'ir.actions.client', + 'tag': 'display_notification', 'params': message} + except Exception as exc: + _logger.warning(exc) + raise UserError(_('Failed Authentication')) from exc + raise UserError(_('Please fill API credentials properly.')) diff --git a/recruitment_twitter/models/res_config_settings.py b/recruitment_twitter/models/res_config_settings.py new file mode 100644 index 000000000..37f4728f2 --- /dev/null +++ b/recruitment_twitter/models/res_config_settings.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """Fields for twitter authentication""" + _inherit = "res.config.settings" + + consumer_key = fields.Char(string="Consumer Key", + help="The Consumer Key provided by Twitter " + "for authentication.", + config_parameter='recruitment_twitter.consumer_key') + consumer_secret = fields.Char(string="Consumer Secret Key", + help="The Consumer Secret Key provided by" + " Twitter for authentication.", + config_parameter='recruitment_twitter.consumer_secret') + access_token = fields.Char(string="Access Token", + help="The Access Token provided by Twitter for" + " authentication.", + config_parameter='recruitment_twitter.access_token') + access_token_secret = fields.Char(string="Access Token Secret", + help="The Access Token Secret provided by" + "Twitter for authentication.", + config_parameter='recruitment_twitter.access_token_secret') diff --git a/recruitment_twitter/static/description/assets/icons/check.png b/recruitment_twitter/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/check.png differ diff --git a/recruitment_twitter/static/description/assets/icons/chevron.png b/recruitment_twitter/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/chevron.png differ diff --git a/recruitment_twitter/static/description/assets/icons/cogs.png b/recruitment_twitter/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/cogs.png differ diff --git a/recruitment_twitter/static/description/assets/icons/consultation.png b/recruitment_twitter/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/consultation.png differ diff --git a/recruitment_twitter/static/description/assets/icons/ecom-black.png b/recruitment_twitter/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/ecom-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/education-black.png b/recruitment_twitter/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/education-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/hotel-black.png b/recruitment_twitter/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/hotel-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/license.png b/recruitment_twitter/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/license.png differ diff --git a/recruitment_twitter/static/description/assets/icons/lifebuoy.png b/recruitment_twitter/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/lifebuoy.png differ diff --git a/recruitment_twitter/static/description/assets/icons/logo.png b/recruitment_twitter/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/logo.png differ diff --git a/recruitment_twitter/static/description/assets/icons/manufacturing-black.png b/recruitment_twitter/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/manufacturing-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/pos-black.png b/recruitment_twitter/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/pos-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/puzzle.png b/recruitment_twitter/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/puzzle.png differ diff --git a/recruitment_twitter/static/description/assets/icons/restaurant-black.png b/recruitment_twitter/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/restaurant-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/service-black.png b/recruitment_twitter/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/service-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/trading-black.png b/recruitment_twitter/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/trading-black.png differ diff --git a/recruitment_twitter/static/description/assets/icons/training.png b/recruitment_twitter/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/training.png differ diff --git a/recruitment_twitter/static/description/assets/icons/update.png b/recruitment_twitter/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/update.png differ diff --git a/recruitment_twitter/static/description/assets/icons/user.png b/recruitment_twitter/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/user.png differ diff --git a/recruitment_twitter/static/description/assets/icons/wrench.png b/recruitment_twitter/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/recruitment_twitter/static/description/assets/icons/wrench.png differ diff --git a/recruitment_twitter/static/description/assets/images/checked.png b/recruitment_twitter/static/description/assets/images/checked.png new file mode 100644 index 000000000..e6c63d582 Binary files /dev/null and b/recruitment_twitter/static/description/assets/images/checked.png differ diff --git a/recruitment_twitter/static/description/assets/modules/1.png b/recruitment_twitter/static/description/assets/modules/1.png new file mode 100644 index 000000000..713d6dee5 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/1.png differ diff --git a/recruitment_twitter/static/description/assets/modules/2.gif b/recruitment_twitter/static/description/assets/modules/2.gif new file mode 100644 index 000000000..07588ba92 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/2.gif differ diff --git a/recruitment_twitter/static/description/assets/modules/3.png b/recruitment_twitter/static/description/assets/modules/3.png new file mode 100644 index 000000000..be440eb23 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/3.png differ diff --git a/recruitment_twitter/static/description/assets/modules/4.png b/recruitment_twitter/static/description/assets/modules/4.png new file mode 100644 index 000000000..6d11dfe59 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/4.png differ diff --git a/recruitment_twitter/static/description/assets/modules/5.jpg b/recruitment_twitter/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..812dc6a4a Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/5.jpg differ diff --git a/recruitment_twitter/static/description/assets/modules/6.gif b/recruitment_twitter/static/description/assets/modules/6.gif new file mode 100644 index 000000000..4c0c52982 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/6.gif differ diff --git a/recruitment_twitter/static/description/assets/screenshots/api.png b/recruitment_twitter/static/description/assets/screenshots/api.png new file mode 100644 index 000000000..ed849b7dc Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/api.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/hero.png b/recruitment_twitter/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..20dd6b135 Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/hero.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/twitter-signup.png b/recruitment_twitter/static/description/assets/screenshots/twitter-signup.png new file mode 100644 index 000000000..f6660417d Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/twitter-signup.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/twtr1.png b/recruitment_twitter/static/description/assets/screenshots/twtr1.png new file mode 100644 index 000000000..54d9b7674 Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/twtr1.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/twtr3.png b/recruitment_twitter/static/description/assets/screenshots/twtr3.png new file mode 100644 index 000000000..bd1fdd120 Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/twtr3.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/twtr4.png b/recruitment_twitter/static/description/assets/screenshots/twtr4.png new file mode 100644 index 000000000..c4e698b38 Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/twtr4.png differ diff --git a/recruitment_twitter/static/description/banner.png b/recruitment_twitter/static/description/banner.png new file mode 100644 index 000000000..e0d65ec7d Binary files /dev/null and b/recruitment_twitter/static/description/banner.png differ diff --git a/recruitment_twitter/static/description/icon.png b/recruitment_twitter/static/description/icon.png new file mode 100644 index 000000000..9fbabf361 Binary files /dev/null and b/recruitment_twitter/static/description/icon.png differ diff --git a/recruitment_twitter/static/description/index.html b/recruitment_twitter/static/description/index.html new file mode 100644 index 000000000..db1e8d43e --- /dev/null +++ b/recruitment_twitter/static/description/index.html @@ -0,0 +1,657 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+
+
+

+ HR Recruitment Twitter Integration +

+

+ Share Your Job Positions Directly to Twitter. +

+ +
+
+ + +
+
+

+ Overview +

+
+ +
+

+ This integration module makes your HR recruitment better. You + can share your Job positions directly to Twitter. +

+ +
+
+ +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Share Recruitment Post to Twitter from Odoo. +

+ +
+
+ +
+
+ +
+
+

+ Enlarge Your Audience Range. +

+ +
+
+ +
+ +
+
+

+ Screenshots +

+
+
+

+ Signup to Twitter Developer Portal +

+ https://developer.twitter.com/en + +
+
+

+ Create a Project and there you will get Keys +

+ +
+ +
+

+ Fill-up App Credentials

+

+ Fill-up Consumer Key, Consumer Secret, Access Token, Access + Token + Secret +

+ +
+ +
+

+ Share Job Requirement with Twitter

+

+ After creating the job position here we can add the attachment + that is to be included in the post. +

+ +
+ + +
+

+ Shared Post on Twitter

+

+ You can see the post with website job position published. +

+ +
+ +
+ + +
+
+

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?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/recruitment_twitter/views/hr_job_views.xml b/recruitment_twitter/views/hr_job_views.xml new file mode 100644 index 000000000..eff4e6557 --- /dev/null +++ b/recruitment_twitter/views/hr_job_views.xml @@ -0,0 +1,20 @@ + + + + + hr.job.view.form.inherit.recruitment.twitter + hr.job + + + + + + + +