| @ -0,0 +1,42 @@ | |||
| .. image:: https://img.shields.io/badge/license-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/15.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 <https://cybrosys.com/>`__ | |||
| 
 | |||
| Credits | |||
| ------- | |||
| * Developer: (V15) Swaraj R, 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 <https://cybrosys.com/>`__ | |||
| 
 | |||
| Further information | |||
| =================== | |||
| HTML Description: `<static/description/index.html>`__ | |||
| @ -0,0 +1,23 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| from . import controllers | |||
| from . import models | |||
| @ -0,0 +1,55 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| { | |||
|     'name': "Website Signup Approval", | |||
|     'version': '15.0.1.0.0', | |||
|     'category': 'Website', | |||
|     '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', | |||
|     'depends': ['website'], | |||
|     '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/sing_up_form_validation.js', | |||
|             'website_signup_approval/static/src/js/signup.js' | |||
|         ], | |||
|     }, | |||
|     'images': ['static/description/banner.png'], | |||
|     'license': 'LGPL-3', | |||
|     'installable': True, | |||
|     'auto_install': False, | |||
|     'application': True, | |||
| } | |||
| @ -0,0 +1,22 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| from . import website_signup_approval | |||
| @ -0,0 +1,136 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 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.main import Home, SIGN_UP_REQUEST_PARAMS | |||
| 
 | |||
| _logger = logging.getLogger(__name__) | |||
| 
 | |||
| 
 | |||
| 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')), | |||
|                  ('is_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, | |||
|                      } | |||
|                 ) | |||
| @ -0,0 +1,14 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <data noupdate="1"> | |||
|         <!--        Channel notification for user approval--> | |||
|         <record id="mail_channel_for_signup_approval" model="mail.channel"> | |||
|             <field name="name">User Approval</field> | |||
|             <field name="group_public_id" | |||
|                    ref="website_signup_approval.website_signup_approval_group_approval_user"/> | |||
|             <field name="group_ids" | |||
|                    eval="[(4, ref('website_signup_approval.website_signup_approval_group_approval_user'))]"/> | |||
|             <field name="description">Notification For User Approval</field> | |||
|         </record> | |||
|     </data> | |||
| </odoo> | |||
| @ -0,0 +1,6 @@ | |||
| ## Module <website_signup_approval> | |||
| 
 | |||
| #### 19.06.2024 | |||
| #### Version 15.0.1.0.0 | |||
| #### ADD | |||
| - Initial Commit for Website Signup Approval. | |||
| @ -0,0 +1,25 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| from . import document_attachment | |||
| from . import res_config_settings | |||
| from . import res_users_approve | |||
| from . import user_approval_window | |||
| @ -0,0 +1,32 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 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") | |||
| @ -0,0 +1,60 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| from ast import literal_eval | |||
| from odoo import api, fields, models | |||
| 
 | |||
| 
 | |||
| class ResConfigSettings(models.TransientModel): | |||
|     """Adding field in res config settings""" | |||
|     _inherit = 'res.config.settings' | |||
| 
 | |||
|     is_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") | |||
| 
 | |||
|     @api.onchange('is_auth_signup_approval') | |||
|     def _onchange_is_auth_signup_approval(self): | |||
|         """Function clear the value in documents_ids if | |||
|         is_auth_signup_approval is false""" | |||
|         if not self.is_auth_signup_approval: | |||
|             self.documents_ids = [fields.Command.clear()] | |||
| 
 | |||
|     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 | |||
| @ -0,0 +1,77 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| from odoo import fields, models, _ | |||
| from odoo.exceptions import UserError | |||
| 
 | |||
| 
 | |||
| 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") | |||
|     is_for_approval_menu = fields.Boolean(string='For Approval Menu', | |||
|                                           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") | |||
|     is_hide_button = fields.Boolean(string='For hide button', | |||
|                                     help="Check the button is used or not") | |||
|     is_reject = fields.Boolean(string='Is Rejected', | |||
|                                help="is record rejected") | |||
| 
 | |||
|     def action_approve_login(self): | |||
|         """To approve the request from website""" | |||
|         if self.env['res.users'].sudo().search([('login', '=', self.email)]): | |||
|             raise UserError( | |||
|                 _(f'Another user already signed up using {self.email}.')) | |||
|         else: | |||
|             self.is_for_approval_menu = True | |||
|             self.is_hide_button = True | |||
|             user = self.env['res.users'].sudo().search( | |||
|                 [('login', '=', self.email)]) | |||
|             if not user: | |||
|                 self.is_reject = False | |||
|                 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.is_for_approval_menu = False | |||
|         self.is_hide_button = True | |||
|         self.is_reject = True | |||
| @ -0,0 +1,34 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Swaraj R @ 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 <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 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") | |||
| 
 | 
| @ -0,0 +1,8 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
| <!--   Creating security group for user --> | |||
|     <record id="website_signup_approval_group_approval_user" model="res.groups"> | |||
|         <field name="name">Signup Approval User</field> | |||
|         <field name="users" eval="[(4, ref('base.user_admin'))]"/> | |||
|     </record> | |||
| </odoo> | |||
| After Width: | Height: | Size: 3.6 KiB | 
| After Width: | Height: | Size: 310 B | 
| After Width: | Height: | Size: 1.3 KiB | 
| After Width: | Height: | Size: 1.4 KiB | 
| After Width: | Height: | Size: 576 B | 
| After Width: | Height: | Size: 733 B | 
| After Width: | Height: | Size: 911 B | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 673 B | 
| After Width: | Height: | Size: 878 B | 
| After Width: | Height: | Size: 653 B | 
| After Width: | Height: | Size: 905 B | 
| After Width: | Height: | Size: 839 B | 
| After Width: | Height: | Size: 427 B | 
| After Width: | Height: | Size: 627 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 988 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 1.5 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.9 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 2.1 KiB | 
| After Width: | Height: | Size: 4.4 KiB | 
| After Width: | Height: | Size: 589 B | 
| After Width: | Height: | Size: 3.4 KiB | 
| After Width: | Height: | Size: 1.7 KiB | 
| After Width: | Height: | Size: 2.3 KiB | 
| After Width: | Height: | Size: 967 B | 
| After Width: | Height: | Size: 1.6 KiB | 
| After Width: | Height: | Size: 3.8 KiB | 
| After Width: | Height: | Size: 5.0 KiB | 
| After Width: | Height: | Size: 57 KiB | 
| After Width: | Height: | Size: 58 KiB | 
| After Width: | Height: | Size: 48 KiB | 
| After Width: | Height: | Size: 80 KiB | 
| After Width: | Height: | Size: 50 KiB | 
| After Width: | Height: | Size: 92 KiB | 
| After Width: | Height: | Size: 142 KiB | 
| After Width: | Height: | Size: 99 KiB | 
| After Width: | Height: | Size: 89 KiB | 
| After Width: | Height: | Size: 100 KiB | 
| After Width: | Height: | Size: 96 KiB | 
| After Width: | Height: | Size: 45 KiB | 
| After Width: | Height: | Size: 141 KiB | 
| After Width: | Height: | Size: 137 KiB | 
| After Width: | Height: | Size: 105 KiB | 
| After Width: | Height: | Size: 211 KiB | 
| After Width: | Height: | Size: 49 KiB | 
| After Width: | Height: | Size: 8.7 KiB | 
| @ -0,0 +1,772 @@ | |||
| <div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> | |||
|     <!-- TITLE BAR --> | |||
|     <div class="d-flex align-items-center justify-content-between" | |||
|          style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> | |||
|         <img src="assets/misc/cybrosys-logo.png" width="42" height="42" | |||
|              style="width: 42px; height: 42px;"/> | |||
|         <div> | |||
|             <div | |||
|                     style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Community | |||
|             </div> | |||
|             <div | |||
|                     style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Enterprise | |||
|             </div> | |||
|             <div | |||
|                     style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Odoo.sh | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <!-- END OF TITLE BAR --> | |||
|     <div class="container"> | |||
|         <div class="row"> | |||
|             <div class="col-sm-12 col-md-12 col-lg-12"> | |||
|                 <!-- APP HERO --> | |||
|                 <h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> | |||
|                     Website Signup Approval | |||
|                 </h1> | |||
|                 <p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> | |||
|                     Manage User Signup Approval Process. | |||
|                 </p> | |||
|                 <!-- END OF APP HERO --> | |||
|                 <img src="assets/screenshot/hero.gif" class="img-responsive" | |||
|                      style="width: 100%; margin-left: auto; margin-right: auto;"/> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- NAVIGATION SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/compass.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Explore This | |||
|         Module | |||
|     </h2> | |||
| </div> | |||
| <div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#overview"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">Learn | |||
|                more about this | |||
|                module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#features"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|                features of this | |||
|                module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#screenshots"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|                screenshots for this | |||
|                module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF NAVIGATION SECTION --> | |||
| <!-- OVERVIEW SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | |||
|      id="overview"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pie-chart.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Overview | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 py-4"> | |||
|         This module approve or reject signup approval request of | |||
|      users from website.User can upload their documents for approval. | |||
|     </div> | |||
| </div> | |||
| <!-- END OF OVERVIEW SECTION --> | |||
| <!-- FEATURES SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | |||
|      id="features"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/features.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Features | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 40px; margin-bottom: 40px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Community & | |||
|          Enterprise Support.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">User signup approval process when a new User signup.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Upload documents of user from Website.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Sent User sign up request.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Approve user request.</span> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF FEATURES SECTION --> | |||
| <!-- SCREENSHOTS SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | |||
|      id="screenshots"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pictures.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Screenshots | |||
|     </h2> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Signup Approval Process In Website | |||
|             </h3> | |||
|             <P>Go to Sales configuration settings, choose Customer Account as | |||
|                 Free sign up, enable Signup Approval and add Attachment | |||
|                 types.</P> | |||
|             <!-- Image Slider --> | |||
|             <div id="orderLine" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/1.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|             <!-- End of Image Slider --> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Create Login Request | |||
|             </h3> | |||
|             <div class="carousel-inner"> | |||
|                 <div class="carousel-item active"> | |||
|                     <img src="assets/screenshot/2.png" | |||
|                          class="d-block w-100 img-thumbnail w-100" | |||
|                          alt="Screenshot"> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| 
 | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Login Request Generation | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|                 After completed the signup form click on the signup button.An | |||
|                 approval request is generated. | |||
|             </p> | |||
|             <!-- Image Slider --> | |||
|             <div id="report" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/3.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Request Records | |||
|             </h3> | |||
|             <p> | |||
|                 Here we can see the request records | |||
|             </p> | |||
|             <div id="Records" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/6.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Request Form Page | |||
|             </h3> | |||
|             <p> | |||
|                 Open the form page we can see the APPROVE LOGIN and REJECT LOGIN | |||
|                 buttons. | |||
|             </p> | |||
|             <div id="Request form" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/7.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Login Alert | |||
|             </h3> | |||
|             <p> | |||
|                 If a person login without the permission it will show the alert message | |||
|             </p> | |||
|             <div id="Alert form" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/5.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Approval Badge | |||
|             </h3> | |||
|             <p> | |||
|                 Showing approved badge when record is approved. | |||
|             </p> | |||
|             <div id="Approval form" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/8.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 User Portal | |||
|             </h3> | |||
|             <p> | |||
|                 Showing the portal of logged user | |||
|             </p> | |||
|             <div id="login_user" class="carousel slide" | |||
|                  data-ride="carousel"> | |||
|                 <div class="carousel-inner"> | |||
|                     <div class="carousel-item active"> | |||
|                         <img src="assets/screenshot/9.png" | |||
|                              class="d-block w-100 img-thumbnail w-100" | |||
|                              alt="Screenshot"> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| 
 | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div id="demo1" class="row carousel slide" data-ride="carousel"> | |||
|             <!-- The slideshow --> | |||
|             <div class="carousel-inner" style="padding: 30px;"> | |||
|                 <div class="carousel-item" style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/purchase_product_history/#" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/1.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/employee_purchase_requisition/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/2.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/purchase_line_views/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/3.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|                 <div class="carousel-item active" | |||
|                      style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/product_brand_purchase/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/4.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/vendor_portal_odoo/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/5.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/purchase_recurring_orders/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/6.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|             <!-- Left and right controls --> | |||
|             <a class="carousel-control-prev" href="#demo1" data-slide="prev" | |||
|                style="width:35px; color:#000"> <span | |||
|                     class="carousel-control-prev-icon"><i | |||
|                     class="fa fa-chevron-left" | |||
|                     style="font-size:24px"></i></span> | |||
|             </a> <a class="carousel-control-next" href="#demo1" | |||
|                     data-slide="next" style="width:35px; color:#000"> | |||
|          <span class="carousel-control-next-icon"><i | |||
|                  class="fa fa-chevron-right" | |||
|                  style="font-size:24px"></i></span> | |||
|         </a> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF RELATED PRODUCTS --> | |||
| <!-- OUR SERVICES --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/star.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our Services | |||
|     </h2> | |||
| </div> | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/cogs.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Customization | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/wrench.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/lifebuoy.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Support | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/user.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Hire | |||
|                 Odoo | |||
|                 Developer | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/puzzle.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Integration | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/update.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Migration | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/consultation.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Consultancy | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/training.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation | |||
|             </h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/license.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Licensing Consultancy | |||
|             </h6> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!--END OF OUR SERVICES --> | |||
| <!-- OUR INDUSTRIES --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/corporate.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our | |||
|         Industries | |||
|     </h2> | |||
| </div> | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/trading-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Trading | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easily procure | |||
|                     and | |||
|                     sell your products | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/pos-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     POS | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easy | |||
|                     configuration | |||
|                     and convivial experience | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/education-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Education | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     A platform for | |||
|                     educational management | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/manufacturing-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Manufacturing | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Plan, track and | |||
|                     schedule your operations | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/ecom-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     E-commerce & Website | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Mobile | |||
|                     friendly, | |||
|                     awe-inspiring product pages | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/service-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Service Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Keep track of | |||
|                     services and invoice | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/restaurant-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Restaurant | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Run your bar or | |||
|                     restaurant methodically | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/hotel-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Hotel Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     An | |||
|                     all-inclusive | |||
|                     hotel management application | |||
|                 </p> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!--END OF OUR INDUSTRIES --> | |||
| <!-- SUPPORT --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/customer-support.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Support | |||
|     </h2> | |||
| </div> | |||
| <div class="container mt-5"> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/support.png" height="48" width="48" | |||
|                          style="width: 42px; height: 42px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>Need Help?</h4> | |||
|                     <p style="line-height: 100%;">Got questions or need help? | |||
|                         Get in touch. | |||
|                     </p> | |||
|                     <a href="mailto:odoo@cybrosys.com"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             odoo@cybrosys.com | |||
|                         </p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/whatsapp.png" height="52" width="52" | |||
|                          style="width: 52px; height: 52px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>WhatsApp</h4> | |||
|                     <p style="line-height: 100%;">Say hi to us on WhatsApp!</p> | |||
|                     <a href="https://api.whatsapp.com/send?phone=918606827707"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             +91 86068 | |||
|                             27707 | |||
|                         </p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> | |||
|             <img src="assets/misc/logo.png" width="144" height="31" | |||
|                  style="width:144px; height: 31px; margin-top: 40px;"/> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF SUPPORT --> | |||
| @ -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; | |||
| }); | |||
| @ -0,0 +1,47 @@ | |||
| odoo.define('website_signup_approval.FormValidation', function (require) { | |||
| 'use strict'; | |||
| 
 | |||
| const publicWidget = require('web.public.widget'); | |||
| //Validation widget class for sign up form validation
 | |||
| publicWidget.registry.FormValidation = publicWidget.Widget.extend({ | |||
|     selector: '.oe_website_login_container', | |||
|     events: { | |||
|         'keyup .oe_signup_form input[name="confirm_password"]': '_checkPassword', | |||
|         'keyup .oe_signup_form input[name="password"]': '_checkPassword', | |||
|         'change .oe_import_file': '_onFileChange' | |||
|     }, | |||
|     //Check weather attached file type is a supported one
 | |||
|      _onFileChange: function (event) { | |||
|         const fileInput = event.currentTarget; | |||
|         const file = fileInput.files[0]; | |||
|         this.$el.find('.document-alert').hide(); | |||
|         if (file) { | |||
|             const allowedTypes = ['application/pdf', 'image/png', 'image/jpeg']; | |||
|             if (!allowedTypes.includes(file.type)) { | |||
|                 this.$el.find('.document-alert').show(); | |||
|                 fileInput.value = '';  // Clear the file input
 | |||
|                 this.$el.find('button[type="submit"]').prop('disabled', true); | |||
|             } else { | |||
|                 this.$el.find('button[type="submit"]').prop('disabled', false); | |||
|             } | |||
|         } | |||
|     }, | |||
|     //Check password and confirm Password are same
 | |||
|     _checkPassword: function(event){ | |||
|         if(this.$el.find("#confirm_password").val() != ''){ | |||
|             if (this.$el.find("#password").val() === this.$el.find("#confirm_password").val()) { | |||
|                 this.$el.find('.pass-alert').hide(); | |||
|                 this.$el.find('button[type="submit"]').prop('disabled', false); | |||
|             } | |||
|             else{ | |||
|                 this.$el.find('.pass-alert').show(); | |||
|                 this.$el.find('button[type="submit"]').prop('disabled', true); | |||
|             } | |||
|         } | |||
|         else{ | |||
|             this.$el.find('.pass-alert').hide(); | |||
|         } | |||
|     }, | |||
| }); | |||
| return publicWidget.registry.FormValidation; | |||
| }); | |||
| @ -0,0 +1,18 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!--    Create Approval Request Success Form--> | |||
|     <template id="approval_form_success" name="Approval Request"> | |||
|         <t t-call="website.layout"> | |||
|             <div id="wrap"> | |||
|                 <div class="container"> | |||
|                     <div class="col-md-12"> | |||
|                         <div class="alert alert-success"> | |||
|                             Thank you, We get your signup request, we will | |||
|                             contact you shortly.. | |||
|                         </div> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|         </t> | |||
|     </template> | |||
| </odoo> | |||
| @ -0,0 +1,35 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!--    Create document types of user--> | |||
|     <record id="document_attachment_action" model="ir.actions.act_window"> | |||
|         <field name="name">Attachments</field> | |||
|         <field name="res_model">document.attachment</field> | |||
|         <field name="view_mode">tree,form</field> | |||
|     </record> | |||
| <!--    Document attachments tree view--> | |||
|     <record id="document_attachment_view_tree" model="ir.ui.view"> | |||
|         <field name="name">document.attachment.view.tree</field> | |||
|         <field name="model">document.attachment</field> | |||
|         <field name="arch" type="xml"> | |||
|             <tree> | |||
|                 <field name="document"/> | |||
|             </tree> | |||
|         </field> | |||
|     </record> | |||
| <!--    Document attachment form view--> | |||
|     <record id="document_attachment_view_form" model="ir.ui.view"> | |||
|         <field name="name">document.attachment.view.form</field> | |||
|         <field name="model">document.attachment</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <group> | |||
|                     <field name="document"/> | |||
|                 </group> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| <!--    document attachment menu--> | |||
|     <menuitem id="document_attachment_menu" name="Attachment" | |||
|               parent="website.menu_website_global_configuration" | |||
|               action="document_attachment_action"/> | |||
| </odoo> | |||
| @ -0,0 +1,37 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!--        Inherited res config settings model--> | |||
|     <record id="res_config_settings_view_form" model="ir.ui.view"> | |||
|         <field name="name"> | |||
|             res.config.settings.view.form.inherit.website.signup.approval | |||
|         </field> | |||
|         <field name="model">res.config.settings</field> | |||
|         <field name="priority" eval="21"/> | |||
|         <field name="inherit_id" ref="base.res_config_settings_view_form"/> | |||
|         <field name="arch" type="xml"> | |||
|             <xpath expr="//div[@id='auth_signup_uninvited_setting']" | |||
|                    position="inside"> | |||
|                 <div attrs="{'invisible': [('auth_signup_uninvited', '=', 'b2b')]}"> | |||
|                     <br/> | |||
|                     <div class="o_setting_left_pane"> | |||
|                         <field name="is_auth_signup_approval"/> | |||
|                     </div> | |||
|                     <div class="o_setting_right_pane"> | |||
|                         <label for="is_auth_signup_approval"/> | |||
|                         <div class="text-muted"> | |||
|                             Attachment Data | |||
|                         </div> | |||
|                         <div class="content-group" | |||
|                              attrs="{'invisible': [('is_auth_signup_approval', '=', False)]}"> | |||
|                             <div class="row mt16"> | |||
|                                 <label class="col-lg-3 o_light_label" string="Attachments" for="documents_ids"/> | |||
|                                 <field name="documents_ids" attrs="{'required': [('is_auth_signup_approval', '=', True)]}" | |||
|                                        widget="many2many_tags"/> | |||
|                             </div> | |||
|                         </div> | |||
|                     </div> | |||
|                 </div> | |||
|             </xpath> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||
| @ -0,0 +1,81 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!-- Create approval request information of user --> | |||
|     <record id="res_user_approve_view_tree" model="ir.ui.view"> | |||
|         <field name="name">res.users.approve.view.tree</field> | |||
|         <field name="model">res.users.approve</field> | |||
|         <field name="mode">primary</field> | |||
|         <field name="arch" type="xml"> | |||
|             <tree> | |||
|                 <field name="name"/> | |||
|                 <field name="email"/> | |||
|                 <field name="password"/> | |||
|             </tree> | |||
|         </field> | |||
|     </record> | |||
| <!--    Res users approve model form view--> | |||
|     <record id="res_user_approve_view_form" model="ir.ui.view"> | |||
|         <field name="name">res.users.approve.view.form</field> | |||
|         <field name="model">res.users.approve</field> | |||
|         <field name="mode">primary</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form string="Form"> | |||
|                 <header> | |||
|                     <button name="action_approve_login" type="object" | |||
|                             attrs="{'invisible': [('is_hide_button', '=', True)]}" | |||
|                             class="oe_highlight" string="Approve Login"/> | |||
|                     <button name="action_reject_login" type="object" | |||
|                             attrs="{'invisible': [('is_hide_button', '=', True)]}" | |||
|                             class="oe_highlight" string="Reject Login"/> | |||
|                 </header> | |||
|                 <sheet> | |||
|                     <widget name="web_ribbon" title="APPROVED" | |||
|                             bg_color="bg-success" | |||
|                              attrs="{'invisible': [('is_for_approval_menu', '=', False)]}"/> | |||
|                     <widget name="web_ribbon" title="Rejected" | |||
|                             bg_color="bg-danger" | |||
|                              attrs="{'invisible': [('is_reject', '=', False)]}"/> | |||
|                     <group> | |||
|                         <group> | |||
|                             <field name="is_for_approval_menu" invisible="1"/> | |||
|                             <field name="is_hide_button" invisible="1"/> | |||
|                             <field name="is_reject" invisible="1"/> | |||
|                         </group> | |||
|                         <group> | |||
|                             <field name="name"/> | |||
|                         </group> | |||
|                         <group> | |||
|                             <field name="email" readonly="1"/> | |||
|                         </group> | |||
|                         <group> | |||
|                             <field name="password" readonly="1"/> | |||
|                         </group> | |||
|                     </group> | |||
|                     <notebook> | |||
|                         <page string='Documents'> | |||
|                             <field name="attachment_ids" readonly="1"> | |||
|                                 <tree> | |||
|                                     <field name="attachments" | |||
|                                            options="{'no_quick_create': True,'size': [600, 600]}" | |||
|                                            widget="image" | |||
|                                            class="oe_avatar"/> | |||
|                                 </tree> | |||
|                             </field> | |||
|                         </page> | |||
|                     </notebook> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| <!--    Res users approve action--> | |||
|     <record id="res_users_approve_action" model="ir.actions.act_window"> | |||
|         <field name="name">Portal Approval</field> | |||
|         <field name="res_model">res.users.approve</field> | |||
|         <field name="type">ir.actions.act_window</field> | |||
|         <field name="view_mode">tree,form</field> | |||
|         <field name="view_id" ref="res_user_approve_view_tree"/> | |||
|     </record> | |||
| <!--    Res users approve menu--> | |||
|     <menuitem id="res_users_approve_menu" parent="base.menu_users" | |||
|               action="res_users_approve_action"/> | |||
| </odoo> | |||
| @ -0,0 +1,44 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!--   These templates are used to sent approval request with uploaded documents--> | |||
|     <template id="document_fields" inherit_id="auth_signup.fields"> | |||
|         <xpath expr="//input[@name='confirm_password']" position="after"> | |||
|             <t t-if="request.env['ir.config_parameter'].sudo().get_param('website_signup_approval.auth_signup_approval') == 'True'"> | |||
|                 <t t-set="get_attachments_set" | |||
|                    t-value="request.env['ir.config_parameter'].sudo().get_param('website_signup_approval.documents_ids')"/> | |||
|                 <div class="span_container" | |||
|                      style="padding-top: 2%; padding-bottom: 2%;"> | |||
|                     <span class="pass-alert" | |||
|                           style="color:red; display:none; margin-left:5%;"> | |||
|                         Password do not match | |||
|                     </span> | |||
|                 </div> | |||
|                 <t t-if="get_attachments_set"> | |||
|                     <t t-foreach="json.loads(get_attachments_set)" t-as="res"> | |||
|                         <t t-set="get_attachments_values" | |||
|                            t-value="request.env['document.attachment'].sudo().search([('id', '=', res)])"/> | |||
|                         <table class="table"> | |||
|                             <t t-foreach="get_attachments_values" t-as="rec"> | |||
|                                 <tr> | |||
|                                     <th> | |||
|                                         <span t-esc="rec.document" | |||
|                                               class="oe_inline"/> | |||
|                                     </th> | |||
|                                     <td> | |||
|                                         <input type="file" | |||
|                                                class="oe_import_file get_attach" | |||
|                                                required="1"/> | |||
|                                     </td> | |||
|                                 </tr> | |||
|                             </t> | |||
|                         </table> | |||
|                     </t> | |||
|                     <span class="document-alert" | |||
|                           style="color:red; display:none;"> | |||
|                         Only PDF, PNG, and JPEG files supported. | |||
|                     </span> | |||
|                 </t> | |||
|             </t> | |||
|         </xpath> | |||
|     </template> | |||
| </odoo> | |||