diff --git a/recruitment_twitter/README.rst b/recruitment_twitter/README.rst new file mode 100755 index 000000000..3c006f66e --- /dev/null +++ b/recruitment_twitter/README.rst @@ -0,0 +1,37 @@ +HR Recruitment Twitter Integration +================================== +This integration module makes your HR recruitment better. + + +Configuration +============= +* Need to install python package tweepy. + +License +------- +General Public License, Version 3 (AGPL v3). + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: Version 15: Akhil @cybrosys + + +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. 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..eb984c915 --- /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', + 'depends': ['base', 'hr_recruitment', 'website'], + 'version': "15.0.1.0.0", + '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", + 'category': 'Tools', + 'images': ['static/description/banner.png'], + 'data': [ + "views/hr_job.xml", + "views/res_config_settings.xml" + ], + 'external_dependencies': { + 'python': ['tweepy'], + }, + '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..1a1e6cde2 --- /dev/null +++ b/recruitment_twitter/doc/RELEASE_NOTES.md @@ -0,0 +1,8 @@ +## Module + +#### 10.03.2023 +#### Version 15.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..21b0ef5ed --- /dev/null +++ b/recruitment_twitter/models/hr_job.py @@ -0,0 +1,77 @@ +# -*- 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 models, fields, _ +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class RecruitmentTwitter(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: + auth = tweepy.OAuthHandler(consumer_key, consumer_secret) + auth.set_access_token(access_token, access_token_secret) + api = tweepy.API(auth) + try: + api.verify_credentials() + except Exception as exc: + _logger.warning(exc) + raise UserError(_('Failed Authentication')) from exc + 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) + media = api.media_upload(file_path) + api.update_status(status=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} + 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..c058d9ef1 --- /dev/null +++ b/recruitment_twitter/models/res_config_settings.py @@ -0,0 +1,36 @@ +# -*- 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 TwittterConfig(models.TransientModel): + """Fields for twitter authentication""" + _inherit = "res.config.settings" + + consumer_key = fields.Char("Consumer Key", + config_parameter='recruitment_twitter.consumer_key') + consumer_secret = fields.Char("Consumer Secret Key", + config_parameter='recruitment_twitter.consumer_secret') + access_token = fields.Char("Access Token", + config_parameter='recruitment_twitter.access_token') + access_token_secret = fields.Char("Access Token Secret", + 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/modules/1.png b/recruitment_twitter/static/description/assets/modules/1.png new file mode 100644 index 000000000..b9375c944 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.png b/recruitment_twitter/static/description/assets/modules/2.png new file mode 100644 index 000000000..a89c30f00 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/2.png 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..bafcdc5b5 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..1ca1b66f2 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.png b/recruitment_twitter/static/description/assets/modules/5.png new file mode 100644 index 000000000..6b1fb9016 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/5.png differ diff --git a/recruitment_twitter/static/description/assets/modules/6.png b/recruitment_twitter/static/description/assets/modules/6.png new file mode 100644 index 000000000..741e68b95 Binary files /dev/null and b/recruitment_twitter/static/description/assets/modules/6.png differ diff --git a/recruitment_twitter/static/description/assets/screenshots/hero.gif b/recruitment_twitter/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e2154d56f Binary files /dev/null and b/recruitment_twitter/static/description/assets/screenshots/hero.gif 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..7075f7687 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..d94d2780a 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..d0ffa5d5d 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..ee4fa9abd 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..cff5ae8a5 Binary files /dev/null and b/recruitment_twitter/static/description/icon.png differ diff --git a/recruitment_twitter/static/description/images/checked.png b/recruitment_twitter/static/description/images/checked.png new file mode 100644 index 000000000..e6c63d582 Binary files /dev/null and b/recruitment_twitter/static/description/images/checked.png differ diff --git a/recruitment_twitter/static/description/index.html b/recruitment_twitter/static/description/index.html new file mode 100644 index 000000000..21bb5d989 --- /dev/null +++ b/recruitment_twitter/static/description/index.html @@ -0,0 +1,640 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+
+
+
+

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

+
+ +
+

+ 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 in Twitter

+

+ you can see the post with website job position published link. +

+ +
+ +
+ + + +
+
+

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.xml b/recruitment_twitter/views/hr_job.xml new file mode 100644 index 000000000..e36dfa136 --- /dev/null +++ b/recruitment_twitter/views/hr_job.xml @@ -0,0 +1,20 @@ + + + + + recruitment.twitter.form + hr.job + + + + + + + +