diff --git a/website_signup_approval/README.rst b/website_signup_approval/README.rst new file mode 100755 index 000000000..f311870cb --- /dev/null +++ b/website_signup_approval/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Website Signup Approval +======================= +This module approve or reject signup approval request of users from website. + +Installation +============ +- www.odoo.com/documentation/16.0/setup/install.html +- Install our custom addon + +License +------- +General Public License, Version 3 (LGPL-3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + (V16) Sruthi pavithran, Contact: odoo@cybrosys.com + +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/website_signup_approval/__init__.py b/website_signup_approval/__init__.py new file mode 100755 index 000000000..f644ac3ea --- /dev/null +++ b/website_signup_approval/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from . import controllers +from . import models diff --git a/website_signup_approval/__manifest__.py b/website_signup_approval/__manifest__.py new file mode 100755 index 000000000..9bd60b0c2 --- /dev/null +++ b/website_signup_approval/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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': "Website Signup Approval", + 'version': '16.0.1.0.0', + 'summary': 'Approve signup request to login to the website', + 'description': """This module approve or reject signup approval request of + users from website.User can upload their documents for approval.""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Website', + 'depends': ['website', 'sale_management', 'web'], + 'data': [ + 'security/website_signup_approval_groups.xml', + 'security/ir.model.access.csv', + 'data/mail_channel_data.xml', + 'views/res_users_approve_views.xml', + 'views/res_config_settings_views.xml', + 'views/signup_templates.xml', + 'views/document_attachment_views.xml', + 'views/approval_request_templates.xml' + ], + 'assets': { + 'web.assets_frontend': [ + 'website_signup_approval/static/src/js/signup.js' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/website_signup_approval/controllers/__init__.py b/website_signup_approval/controllers/__init__.py new file mode 100755 index 000000000..be0ffcfa8 --- /dev/null +++ b/website_signup_approval/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from . import website_signup_approval diff --git a/website_signup_approval/controllers/website_signup_approval.py b/website_signup_approval/controllers/website_signup_approval.py new file mode 100755 index 000000000..78d2395bb --- /dev/null +++ b/website_signup_approval/controllers/website_signup_approval.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +import logging +import werkzeug +from werkzeug.urls import url_encode +from odoo import http, _ +from odoo.exceptions import UserError +from odoo.http import request +from odoo.addons.auth_signup.models.res_users import SignupError +from odoo.addons.web.controllers.home import ensure_db, Home, \ + SIGN_UP_REQUEST_PARAMS, LOGIN_SUCCESSFUL_PARAMS + +_logger = logging.getLogger(__name__) +LOGIN_SUCCESSFUL_PARAMS.add('account_created') + + +class AuthSignupHome(Home): + """Portal user login""" + @http.route() + def web_login(self, *args, **kw): + """Function have login features""" + response = super(AuthSignupHome, self).web_login(*args, **kw) + if response.qcontext and response.qcontext.get('login', False): + inactive_user = request.env['res.users.approve'].sudo().search( + [('name', '=', response.qcontext.get('login')), + ('for_approval_menu', '=', False)]) + if inactive_user: + response.qcontext["error"] = _( + "You can login only after your login get approved..!") + return response + + @http.route('/web/signup', type='http', auth='public', website=True, + sitemap=False) + def web_auth_signup(self, *args, **kw): + """Function have signup features""" + qcontext = self.get_auth_signup_qcontext() + values = {k: v for k, v in request.params.items() if + k in SIGN_UP_REQUEST_PARAMS} + signup_approval = request.env['ir.config_parameter'].sudo().get_param( + 'website_signup_approval.auth_signup_approval') + if values: + if signup_approval: + return request.redirect('/success') + if not qcontext.get('token') and not qcontext.get('signup_enabled'): + raise werkzeug.exceptions.NotFound() + if 'error' not in qcontext and request.httprequest.method == 'POST': + try: + self.do_signup(qcontext) + if qcontext.get('token'): + User = request.env['res.users'] + user_sudo = User.sudo().search( + User._get_login_domain(qcontext.get('login')), + order=User._get_login_order(), limit=1 + ) + template = request.env.ref( + 'auth_signup.mail_template_user_signup_account_created', + raise_if_not_found=False) + if user_sudo and template: + template.sudo().send_mail(user_sudo.id, + force_send=True) + return self.web_login(*args, **kw) + except UserError as e: + qcontext['error'] = e.args[0] + except (SignupError, AssertionError) as e: + if request.env["res.users"].sudo().search( + [("login", "=", qcontext.get("login"))]): + qcontext["error"] = _( + "Another user is already registered using this email address.") + else: + _logger.error("%s", e) + qcontext['error'] = _("Could not create a new account.") + elif 'signup_email' in qcontext: + user = request.env['res.users'].sudo().search( + [('email', '=', qcontext.get('signup_email')), + ('state', '!=', 'new')], limit=1) + if user: + return request.redirect('/web/login?%s' % url_encode( + {'login': user.login, 'redirect': '/web'})) + response = request.render('auth_signup.signup', qcontext) + response.headers['X-Frame-Options'] = 'SAMEORIGIN' + response.headers['Content-Security-Policy'] = "frame-ancestors 'self'" + return response + + @http.route('/success', type='http', auth='public', website=True, + sitemap=False) + def approval_success(self): + """Create approval request success form""" + return request.render("website_signup_approval.approval_form_success") + + +class SignUpApproveController(http.Controller): + """Manage Approval Request in Backend""" + @http.route(['/web/signup/approve'], type='json', auth='public') + def create_attachment(self, **dat): + """Create approval request and attachment in backend""" + data_list = [] + for data in dat['data']: + data = data.split('base64')[1] if data else False + data_list.append((0, 0, {'attachments': data})) + if request.env['res.users.approve'].sudo().search( + [('name', '=', dat['email'])]): + pass + else: + attach = request.env['res.users.approve'].sudo().create( + {'name': dat['email'], + 'email': dat['username'], + 'password': dat['password'], + 'attachment_ids': data_list + }) + for data in dat['data']: + data = data.split('base64')[1] if data else False + request.env['ir.attachment'].sudo().create( + {'name': attach.name, + 'datas': data, + 'res_model': 'res.users.approve', + 'res_id': attach.id, + } + ) diff --git a/website_signup_approval/data/mail_channel_data.xml b/website_signup_approval/data/mail_channel_data.xml new file mode 100644 index 000000000..d6cadeb57 --- /dev/null +++ b/website_signup_approval/data/mail_channel_data.xml @@ -0,0 +1,12 @@ + + + + + + User Approval + + + Notification For User Approval + + + \ No newline at end of file diff --git a/website_signup_approval/doc/RELEASE_NOTES.md b/website_signup_approval/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..585908224 --- /dev/null +++ b/website_signup_approval/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.09.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for Website Signup Approval. \ No newline at end of file diff --git a/website_signup_approval/models/__init__.py b/website_signup_approval/models/__init__.py new file mode 100755 index 000000000..4c286f494 --- /dev/null +++ b/website_signup_approval/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from . import document_attachment +from . import res_config_settings +from . import res_users_approve +from . import signup_approval diff --git a/website_signup_approval/models/document_attachment.py b/website_signup_approval/models/document_attachment.py new file mode 100755 index 000000000..b4a836e0c --- /dev/null +++ b/website_signup_approval/models/document_attachment.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from odoo import fields, models + + +class DocumentAttachment(models.Model): + """Store Information of Attachment""" + _name = "document.attachment" + _rec_name = 'document' + _description = 'Signup Attachments' + + document = fields.Char(string="Attachment", + help="It identify the type of user document") diff --git a/website_signup_approval/models/res_config_settings.py b/website_signup_approval/models/res_config_settings.py new file mode 100755 index 000000000..df30c3cd7 --- /dev/null +++ b/website_signup_approval/models/res_config_settings.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from ast import literal_eval +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """Adding field in res config settings""" + _inherit = 'res.config.settings' + + auth_signup_approval = fields.Boolean(string='Signup Approval', + config_parameter='website_signup_approval.auth_signup_approval', + help="Signup request send only if it is enabled") + documents_ids = fields.Many2many('document.attachment', string='Documents', + help="Select the type of document") + + def set_values(self): + """Set values for the field""" + super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'website_signup_approval.documents_ids', + self.documents_ids.ids) + + def get_values(self): + """Return values for the fields""" + res = super(ResConfigSettings, self).get_values() + params = self.env['ir.config_parameter'].sudo() + limits = params.get_param( + 'website_signup_approval.documents_ids') + res.update(documents_ids=[ + (6, 0, literal_eval(limits))] if limits else False) + return res diff --git a/website_signup_approval/models/res_users_approve.py b/website_signup_approval/models/res_users_approve.py new file mode 100644 index 000000000..bea3b0f69 --- /dev/null +++ b/website_signup_approval/models/res_users_approve.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from odoo import fields, models + + +class ResUsersApprove(models.Model): + """Store Signup Information of Users from Website""" + _name = 'res.users.approve' + _description = "Approval Request Details" + + name = fields.Char(help="name of the user", string='Name') + email = fields.Char(help="email of the user", string="Email") + password = fields.Char(help="password of the user", string="Password") + for_approval_menu = fields.Boolean(string='For Approval menu', + default=False, + help="Check the request is approved") + approved_date = fields.Datetime(string='Approved Date', copy=False, + help="Approval date of signup request") + attachment_ids = fields.One2many('user.approval.window', + 'approval_id', + string='Attachments', + help="Store uploaded document") + + def action_approve_login(self): + """To approve the request from website""" + self.for_approval_menu = True + user = self.env['res.users'].sudo().search([('login', '=', self.name)]) + if not user: + user = self.env['res.users'].sudo().create({ + 'login': self.name, + 'name': self.email, + 'password': self.password, + 'groups_id': [(4, self.env.ref('base.group_portal').id)] + }) + template = self.env.ref( + 'auth_signup.mail_template_user_signup_account_created', + raise_if_not_found=False) + email_values = { + 'email_to': user.login, + } + template.send_mail(user.id, email_values=email_values, + force_send=True) + + def action_reject_login(self): + """To reject the request from website""" + self.for_approval_menu = False + user = self.env['res.users'].sudo().search([('login', '=', self.name)]) + if user: + user.unlink() diff --git a/website_signup_approval/models/signup_approval.py b/website_signup_approval/models/signup_approval.py new file mode 100755 index 000000000..534b6de2d --- /dev/null +++ b/website_signup_approval/models/signup_approval.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 . +# +############################################################################# +from odoo import fields, models + + +class UserApprovalWindow(models.Model): + """Store Information of Attachment in a One2many Field""" + _name = 'user.approval.window' + _description = 'Attachment Details in User Approval Window' + + attachments = fields.Binary(string='Attachments', attachment=True, + help="Store the uploaded document") + approval_id = fields.Many2one('res.users.approve', + help="Signup information's of user") + + +class SignupApproval(models.Model): + """Store Information's of User""" + _name = 'signup.approval' + _description = "Approval Request Details" + + login = fields.Char(string='Email', help="login details of user") + name = fields.Char(string='Name', help="name of the user") + approved_date = fields.Datetime(string='Approved Date', copy=False, + help="Approval date of signup request") + for_approval_menu = fields.Boolean(string='For Approval menu', + help="Check the request is approved") + + def action_approve_login(self): + """To approve the request from website""" + self.env['res.users'].create({ + 'name': self.name, + 'login': self.login, + }) + self.env.ref('base.group_user').users.ids.pop() diff --git a/website_signup_approval/security/ir.model.access.csv b/website_signup_approval/security/ir.model.access.csv new file mode 100755 index 000000000..7bad38988 --- /dev/null +++ b/website_signup_approval/security/ir.model.access.csv @@ -0,0 +1,9 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_user_approval_window,access.user.approval.window,model_user_approval_window,base.group_user,1,1,1,1 +access_user_approval_window_public,access.user.approval.window.portal,model_user_approval_window,base.group_public,1,1,1,1 +access_user_approval_window_portal,access.user.approval.window.public,model_user_approval_window,base.group_portal,1,1,1,1 +access_signup_approval,access.signup.approval,model_signup_approval,base.group_user,1,1,1,1 +access_res_users_approve,access.res.users.approve,model_res_users_approve,base.group_user,1,1,0,1 +access_res_users_approve_public,access.res.users.approve.portal,model_res_users_approve,base.group_public,1,1,0,1 +access_res_users_approve_portal,access.res.users.approve.public,model_res_users_approve,base.group_portal,1,1,0,1 +access_document_attachment,access.document.attachment,model_document_attachment,base.group_user,1,1,1,1 diff --git a/website_signup_approval/security/website_signup_approval_groups.xml b/website_signup_approval/security/website_signup_approval_groups.xml new file mode 100755 index 000000000..26c07ae39 --- /dev/null +++ b/website_signup_approval/security/website_signup_approval_groups.xml @@ -0,0 +1,8 @@ + + + + + Signup Approval User + + + \ No newline at end of file diff --git a/website_signup_approval/static/description/assets/icons/check.png b/website_signup_approval/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/check.png differ diff --git a/website_signup_approval/static/description/assets/icons/chevron.png b/website_signup_approval/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/chevron.png differ diff --git a/website_signup_approval/static/description/assets/icons/cogs.png b/website_signup_approval/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/cogs.png differ diff --git a/website_signup_approval/static/description/assets/icons/consultation.png b/website_signup_approval/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/consultation.png differ diff --git a/website_signup_approval/static/description/assets/icons/ecom-black.png b/website_signup_approval/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/ecom-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/education-black.png b/website_signup_approval/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/education-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/hotel-black.png b/website_signup_approval/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/hotel-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/license.png b/website_signup_approval/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/license.png differ diff --git a/website_signup_approval/static/description/assets/icons/lifebuoy.png b/website_signup_approval/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/lifebuoy.png differ diff --git a/website_signup_approval/static/description/assets/icons/manufacturing-black.png b/website_signup_approval/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/pos-black.png b/website_signup_approval/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/pos-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/puzzle.png b/website_signup_approval/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/puzzle.png differ diff --git a/website_signup_approval/static/description/assets/icons/restaurant-black.png b/website_signup_approval/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/restaurant-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/service-black.png b/website_signup_approval/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/service-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/trading-black.png b/website_signup_approval/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/trading-black.png differ diff --git a/website_signup_approval/static/description/assets/icons/training.png b/website_signup_approval/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/training.png differ diff --git a/website_signup_approval/static/description/assets/icons/update.png b/website_signup_approval/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/update.png differ diff --git a/website_signup_approval/static/description/assets/icons/user.png b/website_signup_approval/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/user.png differ diff --git a/website_signup_approval/static/description/assets/icons/wrench.png b/website_signup_approval/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/wrench.png differ diff --git a/website_signup_approval/static/description/assets/misc/categories.png b/website_signup_approval/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/categories.png differ diff --git a/website_signup_approval/static/description/assets/misc/check-box.png b/website_signup_approval/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/check-box.png differ diff --git a/website_signup_approval/static/description/assets/misc/compass.png b/website_signup_approval/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/compass.png differ diff --git a/website_signup_approval/static/description/assets/misc/corporate.png b/website_signup_approval/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/corporate.png differ diff --git a/website_signup_approval/static/description/assets/misc/customer-support.png b/website_signup_approval/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/customer-support.png differ diff --git a/website_signup_approval/static/description/assets/misc/cybrosys-logo.png b/website_signup_approval/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_signup_approval/static/description/assets/misc/features.png b/website_signup_approval/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/features.png differ diff --git a/website_signup_approval/static/description/assets/misc/logo.png b/website_signup_approval/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/logo.png differ diff --git a/website_signup_approval/static/description/assets/misc/pictures.png b/website_signup_approval/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/pictures.png differ diff --git a/website_signup_approval/static/description/assets/misc/pie-chart.png b/website_signup_approval/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/pie-chart.png differ diff --git a/website_signup_approval/static/description/assets/misc/right-arrow.png b/website_signup_approval/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/right-arrow.png differ diff --git a/website_signup_approval/static/description/assets/misc/star.png b/website_signup_approval/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/star.png differ diff --git a/website_signup_approval/static/description/assets/misc/support.png b/website_signup_approval/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/support.png differ diff --git a/website_signup_approval/static/description/assets/misc/whatsapp.png b/website_signup_approval/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/whatsapp.png differ diff --git a/website_signup_approval/static/description/assets/modules/module01.png b/website_signup_approval/static/description/assets/modules/module01.png new file mode 100755 index 000000000..a9936f593 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module01.png differ diff --git a/website_signup_approval/static/description/assets/modules/module02.png b/website_signup_approval/static/description/assets/modules/module02.png new file mode 100755 index 000000000..1a9e2cbd7 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module02.png differ diff --git a/website_signup_approval/static/description/assets/modules/module03.png b/website_signup_approval/static/description/assets/modules/module03.png new file mode 100755 index 000000000..d3d28e08b Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module03.png differ diff --git a/website_signup_approval/static/description/assets/modules/module04.png b/website_signup_approval/static/description/assets/modules/module04.png new file mode 100755 index 000000000..5297b364a Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module04.png differ diff --git a/website_signup_approval/static/description/assets/modules/module05.png b/website_signup_approval/static/description/assets/modules/module05.png new file mode 100755 index 000000000..2263f673e Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module05.png differ diff --git a/website_signup_approval/static/description/assets/modules/module06.png b/website_signup_approval/static/description/assets/modules/module06.png new file mode 100755 index 000000000..0b8c68699 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/module06.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/hero.gif b/website_signup_approval/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..8201576de Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/hero.gif differ diff --git a/website_signup_approval/static/description/assets/screenshots/website.png b/website_signup_approval/static/description/assets/screenshots/website.png new file mode 100644 index 000000000..db55860b2 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website1.png b/website_signup_approval/static/description/assets/screenshots/website1.png new file mode 100644 index 000000000..c607f9e06 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website1.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website3.png b/website_signup_approval/static/description/assets/screenshots/website3.png new file mode 100644 index 000000000..034e89036 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website3.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website33.png b/website_signup_approval/static/description/assets/screenshots/website33.png new file mode 100644 index 000000000..c2063ce66 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website33.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website333.png b/website_signup_approval/static/description/assets/screenshots/website333.png new file mode 100644 index 000000000..43a6b3c95 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website333.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website4.png b/website_signup_approval/static/description/assets/screenshots/website4.png new file mode 100644 index 000000000..792358d2e Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website4.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website5.png b/website_signup_approval/static/description/assets/screenshots/website5.png new file mode 100644 index 000000000..7d3a834ab Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website5.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website6.png b/website_signup_approval/static/description/assets/screenshots/website6.png new file mode 100644 index 000000000..5385925f6 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website6.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website7.png b/website_signup_approval/static/description/assets/screenshots/website7.png new file mode 100644 index 000000000..1dfc66458 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website7.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website8.png b/website_signup_approval/static/description/assets/screenshots/website8.png new file mode 100644 index 000000000..9d423a5e5 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website8.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website9.png b/website_signup_approval/static/description/assets/screenshots/website9.png new file mode 100644 index 000000000..4e7185876 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website9.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/website_66.png b/website_signup_approval/static/description/assets/screenshots/website_66.png new file mode 100644 index 000000000..14ba9e40b Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/website_66.png differ diff --git a/website_signup_approval/static/description/banner.jpg b/website_signup_approval/static/description/banner.jpg new file mode 100755 index 000000000..2b7aaa6d2 Binary files /dev/null and b/website_signup_approval/static/description/banner.jpg differ diff --git a/website_signup_approval/static/description/icon.png b/website_signup_approval/static/description/icon.png new file mode 100755 index 000000000..1e72845f3 Binary files /dev/null and b/website_signup_approval/static/description/icon.png differ diff --git a/website_signup_approval/static/description/index.html b/website_signup_approval/static/description/index.html new file mode 100644 index 000000000..5f07f6e0f --- /dev/null +++ b/website_signup_approval/static/description/index.html @@ -0,0 +1,550 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+

Website Signup Approval

+

Manage User Signup Approval Process

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to approve/reject user signup request +
+
+ + + +
+
+ +
+

Features +

+
+
+
+ +
+ + User Signup Approval Process when a new User Signup +
+
+ + Upload Documents of User from Website +
+
+ + Approve/Reject User Signup Requests +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Signup Approval process in Website +

+

Go to Sales Configuration Settings, Choose Customer Account as Free sign up, Enable Signup Approval and add attachment types

+ +

Upload User Documents

+ +

After completed the signup form click on the signup button.An approval request is generated

+ +

When we try to login with that login and password we get an error

+ +

Clicking on the Portal Approval menu in the Users we can see the approval request

+ +

We can Approve/Reject the signup request

+ +

After clicking the Approve button we can see the request is approved now

+ +

A portal user is created in Users

+ +

Now we can login that user in to the portal

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

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/website_signup_approval/static/src/js/signup.js b/website_signup_approval/static/src/js/signup.js new file mode 100755 index 000000000..155db1345 --- /dev/null +++ b/website_signup_approval/static/src/js/signup.js @@ -0,0 +1,42 @@ +odoo.define('website_signup_approval.signup', function (require) { + 'use strict'; + + var publicWidget = require('web.public.widget'); + var MySignUpForm = publicWidget.registry.SignUpForm.extend({ + _onSubmit: function (el) { + /** + *Override onSubmit function for sending approval request + */ + var file = this.$('.get_attach'); + var email = this.$('input[name=login]').val(); + var username = this.$('input[name=name]').val(); + var password = this.$('input[name=password]').val(); + //Get signup information's from user + const data_array = [] + var count=0; + for (var doc = 0; doc < file.length; doc++) { + var SelectedFile = new FileReader(); + var data = SelectedFile.readAsDataURL(file[doc].files[0]); + SelectedFile.addEventListener('load', (e) => { + count++; + const data = e.target.result; + data_array.push(data) + if (count===(file.length)){ + //Pass parameters to the route + this._rpc({ + route: '/web/signup/approve', + params: { + 'data':data_array, + 'email':email, + 'username':username, + 'password':password + }, + }); + } + }); + } + }, + }); + publicWidget.registry.MySignUpForm = MySignUpForm; + return MySignUpForm; +}); diff --git a/website_signup_approval/views/approval_request_templates.xml b/website_signup_approval/views/approval_request_templates.xml new file mode 100644 index 000000000..486b8301b --- /dev/null +++ b/website_signup_approval/views/approval_request_templates.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/website_signup_approval/views/document_attachment_views.xml b/website_signup_approval/views/document_attachment_views.xml new file mode 100755 index 000000000..3ee4c9c32 --- /dev/null +++ b/website_signup_approval/views/document_attachment_views.xml @@ -0,0 +1,32 @@ + + + + + Attachments + document.attachment + tree,form + + + document.attachment.view.tree + document.attachment + + + + + + + + document.attachment.view.form + document.attachment + +
+ + + +
+
+
+ +
\ No newline at end of file diff --git a/website_signup_approval/views/res_config_settings_views.xml b/website_signup_approval/views/res_config_settings_views.xml new file mode 100755 index 000000000..b31140cec --- /dev/null +++ b/website_signup_approval/views/res_config_settings_views.xml @@ -0,0 +1,35 @@ + + + + + + res.config.settings.view.form.inherit.website.signup.approval + + res.config.settings + + + + +
+
+ +
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/website_signup_approval/views/res_users_approve_views.xml b/website_signup_approval/views/res_users_approve_views.xml new file mode 100755 index 000000000..1af842738 --- /dev/null +++ b/website_signup_approval/views/res_users_approve_views.xml @@ -0,0 +1,71 @@ + + + + + res.users.approve.view.tree + res.users.approve + primary + + + + + + + + + + res.users.approve.view.form + res.users.approve + primary + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + Portal Approval + res.users.approve + ir.actions.act_window + tree,form + + + +
\ No newline at end of file diff --git a/website_signup_approval/views/signup_templates.xml b/website_signup_approval/views/signup_templates.xml new file mode 100755 index 000000000..33de0c693 --- /dev/null +++ b/website_signup_approval/views/signup_templates.xml @@ -0,0 +1,33 @@ + + + + + \ No newline at end of file