diff --git a/website_signup_approval/README.rst b/website_signup_approval/README.rst new file mode 100755 index 000000000..ca7eccdb4 --- /dev/null +++ b/website_signup_approval/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-green.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/17.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: (V17) Vishnu KP, 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..e9966f532 --- /dev/null +++ b/website_signup_approval/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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..5affb618f --- /dev/null +++ b/website_signup_approval/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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': '17.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'], + 'data': [ + 'security/website_signup_approval_groups.xml', + 'security/ir.model.access.csv', + 'data/website_signup_approval_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..cdc0a0551 --- /dev/null +++ b/website_signup_approval/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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..cc36c7b74 --- /dev/null +++ b/website_signup_approval/controllers/website_signup_approval.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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().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( + [('email', '=', dat['email'])]): + pass + else: + attach = request.env['res.users.approve'].sudo().create( + {'name': dat['username'], + 'email': dat['email'], + '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/website_signup_approval_data.xml b/website_signup_approval/data/website_signup_approval_data.xml new file mode 100644 index 000000000..195f613e8 --- /dev/null +++ b/website_signup_approval/data/website_signup_approval_data.xml @@ -0,0 +1,14 @@ + + + + + + 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..24c382b26 --- /dev/null +++ b/website_signup_approval/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 15.01.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Website Signup Approval. diff --git a/website_signup_approval/models/__init__.py b/website_signup_approval/models/__init__.py new file mode 100755 index 000000000..01e74b084 --- /dev/null +++ b/website_signup_approval/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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 +from . import user_approval_window diff --git a/website_signup_approval/models/document_attachment.py b/website_signup_approval/models/document_attachment.py new file mode 100755 index 000000000..804ad517c --- /dev/null +++ b/website_signup_approval/models/document_attachment.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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" + _description = 'Signup Attachments' + _rec_name = 'document' + + 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..cd62b92cb --- /dev/null +++ b/website_signup_approval/models/res_config_settings.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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..9b8c07334 --- /dev/null +++ b/website_signup_approval/models/res_users_approve.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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") + hide_button = fields.Boolean(string='For hide button', + default=False, + help="Check the button is used or not") + + def action_approve_login(self): + """To approve the request from website""" + self.for_approval_menu = True + self.hide_button = True + user = self.env['res.users'].sudo().search([('login', '=', self.email)]) + if not user: + user = self.env['res.users'].sudo().create({ + 'login': self.email, + 'name': self.name, + '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 + self.hide_button = True + user = self.env['res.users'].sudo().search([('login', '=', self.email)]) + 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..6793d3df3 --- /dev/null +++ b/website_signup_approval/models/signup_approval.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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 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/models/user_approval_window.py b/website_signup_approval/models/user_approval_window.py new file mode 100644 index 000000000..8c0905650 --- /dev/null +++ b/website_signup_approval/models/user_approval_window.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com) +# +# 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 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", + string="Approval ID") 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..6fd09df07 --- /dev/null +++ b/website_signup_approval/security/website_signup_approval_groups.xml @@ -0,0 +1,8 @@ + + + + + Signup Approval User + + + diff --git a/website_signup_approval/static/description/assets/icons/capture (1).png b/website_signup_approval/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/capture (1).png differ 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/img.png b/website_signup_approval/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/img.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 100644 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 100644 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 100644 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/photo-capture.png b/website_signup_approval/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/website_signup_approval/static/description/assets/icons/photo-capture.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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/Cybrosys R.png b/website_signup_approval/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/website_signup_approval/static/description/assets/misc/Cybrosys R.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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/email.svg b/website_signup_approval/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 100644 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 100644 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/phone.svg b/website_signup_approval/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + 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 100644 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 100644 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 100644 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 (1) 2.svg b/website_signup_approval/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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 100644 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 (1) 1.svg b/website_signup_approval/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_signup_approval/static/description/assets/misc/support-email.svg b/website_signup_approval/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + 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 100644 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/tick-mark.svg b/website_signup_approval/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/website_signup_approval/static/description/assets/misc/whatsapp 1.svg b/website_signup_approval/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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 100644 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/misc/whatsapp.svg b/website_signup_approval/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/website_signup_approval/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website_signup_approval/static/description/assets/modules/1.png b/website_signup_approval/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/1.png differ diff --git a/website_signup_approval/static/description/assets/modules/2.png b/website_signup_approval/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/2.png differ diff --git a/website_signup_approval/static/description/assets/modules/3.png b/website_signup_approval/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/3.png differ diff --git a/website_signup_approval/static/description/assets/modules/4.png b/website_signup_approval/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/4.png differ diff --git a/website_signup_approval/static/description/assets/modules/5.png b/website_signup_approval/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/5.png differ diff --git a/website_signup_approval/static/description/assets/modules/6.png b/website_signup_approval/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/website_signup_approval/static/description/assets/modules/6.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/need2aprv.png b/website_signup_approval/static/description/assets/screenshots/need2aprv.png new file mode 100644 index 000000000..20db9cbde Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/need2aprv.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/portal.png b/website_signup_approval/static/description/assets/screenshots/portal.png new file mode 100644 index 000000000..9e9bfec2c Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/portal.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/portal2.png b/website_signup_approval/static/description/assets/screenshots/portal2.png new file mode 100644 index 000000000..f296ac200 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/portal2.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/ss1.png b/website_signup_approval/static/description/assets/screenshots/ss1.png new file mode 100644 index 000000000..c590b3dfd Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/ss1.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/ss2png.png b/website_signup_approval/static/description/assets/screenshots/ss2png.png new file mode 100644 index 000000000..8529f3efd Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/ss2png.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/ss4.png b/website_signup_approval/static/description/assets/screenshots/ss4.png new file mode 100644 index 000000000..24e2d1ccb Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/ss4.png differ diff --git a/website_signup_approval/static/description/assets/screenshots/ss7.png b/website_signup_approval/static/description/assets/screenshots/ss7.png new file mode 100644 index 000000000..728a641f6 Binary files /dev/null and b/website_signup_approval/static/description/assets/screenshots/ss7.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..918cba6e7 --- /dev/null +++ b/website_signup_approval/static/description/index.html @@ -0,0 +1,640 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo SH +
+
+
+
+
+
+

+ Website Signup Approval

+

+ Manage User Signup Approval Process +

+
+ +
+
+
+ +
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Approval Process

+

User Signup Approval Process when a new User Signup. +

+
+
+
+
+
+
+ +
+
+

User Document Management

+

Upload Documents of User from Website. +

+
+
+
+
+
+
+ +
+
+

Approve/Reject The Request.

+

Approve/Reject User Signup Requests from the backend. +

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

+ Signup Approval process in Website

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

+ Create Login Request

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

+ Login Request Generation

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

+ Request Records

+
+ Here We can see the Request Records
+
+
+
+
+
+
+ +
+
+

+ Request form page

+
+ Open the Form Page We can See the Request Accept and Reject Button
+
+
+
+ +
+
+
+ +
+
+

+ Login Alert

+
+ If a person Login without the permission it Will Show the Alert Message
+
+
+
+
+
+
+ +
+
+

+ Approval Badge

+
+ Showing Access Badge When Giving Approval
+
+
+
+
+
+
+
    +
  • + User Signup Approval Process when a new User Signup. +
  • +
  • + Upload Documents of User from Website. +
  • +
  • + Upload Documents of User from Website. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:07th Nov 2023 +
+

+ Odoo 17 Website Signup Approval.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Licensing Consultancy

+
+
+
+
+
+
+

Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

Education

+

A platform for educational management

+
+
+
+
+ +

Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service Management

+

Keep track of services and invoice

+
+
+
+
+ +

Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to us on WhatsApp!

+
+91 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + 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..673cb98a0 --- /dev/null +++ b/website_signup_approval/static/src/js/signup.js @@ -0,0 +1,39 @@ +/** @odoo-module **/ + import publicWidget from "@web/legacy/js/public/public_widget"; + import { jsonrpc } from "@web/core/network/rpc_service"; + 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 + const route = jsonrpc("/web/signup/approve", + { + '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..b65b6e64e --- /dev/null +++ b/website_signup_approval/views/approval_request_templates.xml @@ -0,0 +1,18 @@ + + + + + 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..1587700f1 --- /dev/null +++ b/website_signup_approval/views/document_attachment_views.xml @@ -0,0 +1,35 @@ + + + + + Attachments + document.attachment + tree,form + + + + document.attachment.view.tree + document.attachment + + + + + + + + + document.attachment.view.form + document.attachment + +
+ + + +
+
+
+ + +
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..01e481b1d --- /dev/null +++ b/website_signup_approval/views/res_config_settings_views.xml @@ -0,0 +1,34 @@ + + + + + + res.config.settings.view.form.inherit.website.signup.approval + + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+
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..cc45d5ee9 --- /dev/null +++ b/website_signup_approval/views/res_users_approve_views.xml @@ -0,0 +1,77 @@ + + + + + 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 + + + + +
diff --git a/website_signup_approval/views/signup_templates.xml b/website_signup_approval/views/signup_templates.xml new file mode 100755 index 000000000..50b582e09 --- /dev/null +++ b/website_signup_approval/views/signup_templates.xml @@ -0,0 +1,33 @@ + + + + +