diff --git a/certificate_license_expiry/README.rst b/certificate_license_expiry/README.rst new file mode 100644 index 000000000..ec31b103e --- /dev/null +++ b/certificate_license_expiry/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Certificate And License With Expiry Management +============================================== +This module allow to manage certificates and licenses. + +Configuration +============= +* No configuration is required + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE v3.0 (AGPL-3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V17) Nivedhya T Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/certificate_license_expiry/__init__.py b/certificate_license_expiry/__init__.py new file mode 100644 index 000000000..580850542 --- /dev/null +++ b/certificate_license_expiry/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import controllers +from . import models diff --git a/certificate_license_expiry/__manifest__.py b/certificate_license_expiry/__manifest__.py new file mode 100644 index 000000000..a1ad449c6 --- /dev/null +++ b/certificate_license_expiry/__manifest__.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Certificate And License With Expiry Management', + 'version': '17.0.1.0.0', + 'category': 'Document Management', + 'summary': """Certificate And License With Expiry Management helps you + to manage certificates and licenses""", + 'description': """We can manage the certificates and licenses + using this module""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['project', 'contacts', 'website', 'product','web'], + 'data': [ + 'security/certificates_license_expiry_groups.xml', + 'security/certificates_security.xml', + 'security/license_security.xml', + 'security/ir.model.access.csv', + 'data/ir_sequence_data.xml', + 'data/ir_cron_data.xml', + 'data/certificates_mail_template_data.xml', + 'data/license_mail_template_data.xml', + 'views/certificates_license_menus.xml', + 'views/certificates_views.xml', + 'views/license_views.xml', + 'views/certificates_portal.xml', + 'views/res_partner_views.xml', + 'views/license_portal.xml', + 'views/certificates_search.xml', + 'views/license_search.xml', + 'report/certificates_reports.xml', + 'report/license_reports.xml', + 'report/certificates_templates.xml', + 'report/license_templates.xml', + ], + 'demo': [ + 'demo/certificates_license_types_demo.xml', + 'demo/certificates_license_tags_demo.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'certificate_license_expiry/static/src/css/certificate_license.css', + ], + 'web.assets_frontend': [ + 'certificate_license_expiry/static/src/js/certificates_group_by.js', + 'certificate_license_expiry/static/src/js/certificates_search.js', + 'certificate_license_expiry/static/src/js/license_group_by.js', + 'certificate_license_expiry/static/src/js/license_search.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/certificate_license_expiry/controllers/__init__.py b/certificate_license_expiry/controllers/__init__.py new file mode 100644 index 000000000..6c4691fc9 --- /dev/null +++ b/certificate_license_expiry/controllers/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import certificates +from . import certificates_group_by +from . import certificates_search +from . import license +from . import license_group_by +from . import license_search diff --git a/certificate_license_expiry/controllers/certificates.py b/certificate_license_expiry/controllers/certificates.py new file mode 100644 index 000000000..4514578f7 --- /dev/null +++ b/certificate_license_expiry/controllers/certificates.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request +from odoo.addons.portal.controllers import portal + + +class MyCertificates(http.Controller): + """It returns the login person""" + + def _get_tickets_domain(self): + """It returns the login person""" + return [('customer_id', '=', request.env.user.partner_id.id)] + + @http.route(['/my/certificates'], type='http', auth="user", website=True) + def get_my_certificates(self): + """Take values from certificates and render to portal tree template """ + domain = self._get_tickets_domain() + certificates = request.env['certificates'].sudo().search(domain) + values = { + 'certificates': certificates, + } + return request.render( + "certificate_license_expiry.portal_my_certificates", values) + + @http.route(['/my/certificates/form/'], type='http', + auth="user", website=True) + def get_my_certificates_form(self, cer_id): + """Take values from certificates and render to portal form + template.It also passes the id in the root for rendering the + corresponding form template""" + certificates = request.env['certificates'].sudo().search( + [('id', '=', cer_id)]) + values = { + 'my_certificates': certificates, + } + return request.render( + "certificate_license_expiry.certificates_portal_form_template", + values) + + +class Return(portal.CustomerPortal): + """This will take the count of total certificates""" + + def _prepare_home_portal_values(self, counters): + """This will return the certificates count""" + values = super(Return, self)._prepare_home_portal_values(counters) + certificates = request.env['certificates'].sudo().search( + [('customer_id', '=', request.env.user.partner_id.id)]) + count = len(certificates) + values.update({ + 'certificates': count + }) + return values diff --git a/certificate_license_expiry/controllers/certificates_group_by.py b/certificate_license_expiry/controllers/certificates_group_by.py new file mode 100644 index 000000000..4ad8fac6f --- /dev/null +++ b/certificate_license_expiry/controllers/certificates_group_by.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request + + +class CertificatesGroupBy(http.Controller): + """This is used to certificates group by in tree view""" + + @http.route(['/certificatesgroupby'], type='json', auth="public", + website=True) + def certificates_group_by(self, **kwargs): + """Call from rpc for group by, and it returns the corresponding + values""" + context = [] + group_value = kwargs.get("search_value") + if group_value == '1': + context = [] + type_ids = request.env['certificates.types'].sudo().search([]) + for types in type_ids: + certificates_ids = request.env['certificates'].sudo().search([ + ('certificates_types_id', '=', types.id), + ('customer_id', '=', request.env.user.partner_id.id) + ]) + if certificates_ids: + context.append({ + 'name': types.certificate_type, + 'data': certificates_ids + }) + if group_value == '2': + context = [] + tag_ids = request.env['certificates.tags'].sudo().search([]) + for tags in tag_ids: + certificates_ids = request.env['certificates'].sudo().search([ + ('certificates_tags_ids', '=', tags.id), + ('customer_id', '=', request.env.user.partner_id.id) + ]) + if certificates_ids: + context.append({ + 'name': tags.certificates_tags, + 'data': certificates_ids + }) + values = { + 'certificates': context, + } + response = http.Response( + template='certificate_license_expiry' + '.certificates_group_by_template', + qcontext=values) + return response.render() diff --git a/certificate_license_expiry/controllers/certificates_search.py b/certificate_license_expiry/controllers/certificates_search.py new file mode 100644 index 000000000..963c40cc2 --- /dev/null +++ b/certificate_license_expiry/controllers/certificates_search.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request + + +class MyCertificatesSearch(http.Controller): + """This is used to search feature in certificates portal tree view""" + + @http.route(['/certificatesearch'], type='json', auth="public", + website=True) + def certificates_search(self, **kwargs): + """It gives the values and return the response to corresponding + template""" + search_value = kwargs.get("search_value") + if not search_value: + certificates = request.env["certificates"].sudo().search( + [('customer_id', '=', request.env.user.partner_id.id)]) + else: + certificates = request.env["certificates"].sudo().search( + [('certificate_number', '=', search_value), + ('customer_id', '=', request.env.user.partner_id.id)]) + values = { + 'certificates': certificates, + } + response = http.Response( + template='certificate_license_expiry.portal_my_certificates_tree', + qcontext=values) + return response.render() diff --git a/certificate_license_expiry/controllers/license.py b/certificate_license_expiry/controllers/license.py new file mode 100644 index 000000000..913c4bc77 --- /dev/null +++ b/certificate_license_expiry/controllers/license.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request +from odoo.addons.portal.controllers import portal + + +class MyLicense(http.Controller): + """It returns the login person""" + + def _get_tickets_domain(self): + """It returns the login person""" + return [('customer_id', '=', request.env.user.partner_id.id)] + + @http.route(['/my/license'], type='http', auth="user", website=True) + def get_my_license(self): + """Take values from licenses and render to portal tree template """ + domain = self._get_tickets_domain() + license = request.env['license'].sudo().search(domain) + values = {'license': license, + } + return request.render( + "certificate_license_expiry.portal_my_license", values) + + @http.route(['/my/license/form/'], type='http', auth="user", + website=True) + def get_my_license_form(self, lic_id): + """Take values from license and render to portal form template.It + also passes the id in the root for rendering the corresponding form + template""" + license = request.env['license'].sudo().search([('id', '=', lic_id)]) + values = { + 'my_license': license, + } + return request.render( + "certificate_license_expiry.license_portal_form_template", + values) + + +class Return(portal.CustomerPortal): + """This will take the count of total license""" + + def _prepare_home_portal_values(self, counters): + """This will return the license count""" + values = super(Return, self)._prepare_home_portal_values(counters) + license = request.env['license'].sudo().search( + [('customer_id', '=', request.env.user.partner_id.id)]) + count = len(license) + values.update({ + 'license': count + }) + return values diff --git a/certificate_license_expiry/controllers/license_group_by.py b/certificate_license_expiry/controllers/license_group_by.py new file mode 100644 index 000000000..15743e9ee --- /dev/null +++ b/certificate_license_expiry/controllers/license_group_by.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request + + +class LicenseGroupBy(http.Controller): + """This is used to license group by in tree view""" + + @http.route(['/licensegroupby'], type='json', auth="public", website=True) + def license_group_by(self, **kwargs): + """Call from rpc for group by, and it returns the corresponding + values""" + context = [] + group_value = kwargs.get("search_value") + if group_value == '1': + context = [] + type_ids = request.env['license.types'].sudo().search([]) + for types in type_ids: + license_ids = request.env['license'].sudo().search([ + ('license_types_id', '=', types.id), + ('customer_id', '=', request.env.user.partner_id.id) + ]) + if license_ids: + context.append({ + 'name': types.license_type, + 'data': license_ids + }) + if group_value == '2': + context = [] + tag_ids = request.env['license.tags'].sudo().search([]) + for tags in tag_ids: + license_ids = request.env['license'].sudo().search([ + ('license_tags_ids', '=', tags.id), + ('customer_id', '=', request.env.user.partner_id.id) + ]) + if license_ids: + context.append({ + 'name': tags.license_tags_ids, + 'data': license_ids + }) + values = { + 'license': context, + } + response = http.Response( + template='certificate_license_expiry.license_group_by_template', + qcontext=values) + return response.render() diff --git a/certificate_license_expiry/controllers/license_search.py b/certificate_license_expiry/controllers/license_search.py new file mode 100644 index 000000000..9a160a905 --- /dev/null +++ b/certificate_license_expiry/controllers/license_search.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import http +from odoo.http import request + + +class MyLicenseSearch(http.Controller): + """This is used to search feature in license portal tree view""" + + @http.route(['/licensesearch'], type='json', auth="public", website=True) + def license_search(self, **kwargs): + """It gives the values and return the response to corresponding + template""" + search_value = kwargs.get("search_value") + if not search_value: + license = request.env["license"].sudo().search( + [('customer_id', '=', + request.env.user.partner_id.id)]) + else: + license = request.env["license"].sudo().search( + [('license_number', '=', search_value), + ('customer_id', '=', request.env.user.partner_id.id)]) + values = { + 'license': license, + } + response = http.Response( + template='certificate_license_expiry.portal_my_license_tree', + qcontext=values) + return response.render() diff --git a/certificate_license_expiry/data/certificates_mail_template_data.xml b/certificate_license_expiry/data/certificates_mail_template_data.xml new file mode 100644 index 000000000..527460d40 --- /dev/null +++ b/certificate_license_expiry/data/certificates_mail_template_data.xml @@ -0,0 +1,123 @@ + + + + + Certificate Expiry Mail + + Certificate Expiry + +
+

+ Hello, +
+
+ + + Your Certificate Is Expired + +

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

+ +

+
+ Certificate + + + + +
+ Start Date + + + + +
+ Expire Date + + + + +
+ Certificate Type + + + + +
+ Issued by + + + + +
+ Project + + + + +
+ Task + + + + +
+ Product + + + + +
+ Status + + + + +
+
+
+
diff --git a/certificate_license_expiry/data/ir_cron_data.xml b/certificate_license_expiry/data/ir_cron_data.xml new file mode 100644 index 000000000..4d73589f3 --- /dev/null +++ b/certificate_license_expiry/data/ir_cron_data.xml @@ -0,0 +1,27 @@ + + + + + Certificate Expiry + + code + model.certificate_expiry_action() + + 1 + days + -1 + + + + + License Expiry + + code + model.license_expiry_action() + + 1 + days + -1 + + + diff --git a/certificate_license_expiry/data/ir_sequence_data.xml b/certificate_license_expiry/data/ir_sequence_data.xml new file mode 100644 index 000000000..50472095e --- /dev/null +++ b/certificate_license_expiry/data/ir_sequence_data.xml @@ -0,0 +1,27 @@ + + + + + + Certificate + certificates + True + CER + 5 + 1 + 1 + + + + + License + license + True + LIC + 5 + 1 + 1 + + + + diff --git a/certificate_license_expiry/data/license_mail_template_data.xml b/certificate_license_expiry/data/license_mail_template_data.xml new file mode 100644 index 000000000..919e0cfe6 --- /dev/null +++ b/certificate_license_expiry/data/license_mail_template_data.xml @@ -0,0 +1,123 @@ + + + + + License Expiry Mail + + License Expiry + +
+

+ Hello, +
+
+ + + Your License Is Expired + +

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

+ +

+
+ License + + + + +
+ Start Date + + + + +
+ Expire Date + + + + +
+ License Type + + + + +
+ Issued by + + + + +
+ Project + + + + +
+ Task + + + + +
+ Product + + + + +
+ Status + + + + +
+
+
+
diff --git a/certificate_license_expiry/demo/certificates_license_tags_demo.xml b/certificate_license_expiry/demo/certificates_license_tags_demo.xml new file mode 100644 index 000000000..459a598e0 --- /dev/null +++ b/certificate_license_expiry/demo/certificates_license_tags_demo.xml @@ -0,0 +1,45 @@ + + + + + + New + + + + Old + + + + Information + + + + Online + + + + Others + + + + New + + + + Old + + + + Information + + + + Online + + + + Other + + + diff --git a/certificate_license_expiry/demo/certificates_license_types_demo.xml b/certificate_license_expiry/demo/certificates_license_types_demo.xml new file mode 100644 index 000000000..77c6d9e74 --- /dev/null +++ b/certificate_license_expiry/demo/certificates_license_types_demo.xml @@ -0,0 +1,53 @@ + + + + + + Personal + + + + Professional + + + + Experience + + + + Birth + + + + Degree + + + + Business + + + + Personal + + + + Professional + + + + Operating + + + + Premises + + + + Course + + + + Business + + + diff --git a/certificate_license_expiry/doc/RELEASE_NOTES.md b/certificate_license_expiry/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..aedd0fe32 --- /dev/null +++ b/certificate_license_expiry/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 11.09.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Certificate And License With Expiry Management diff --git a/certificate_license_expiry/models/__init__.py b/certificate_license_expiry/models/__init__.py new file mode 100644 index 000000000..a19a806f3 --- /dev/null +++ b/certificate_license_expiry/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import certificates +from . import license +from . import res_partner diff --git a/certificate_license_expiry/models/certificates.py b/certificate_license_expiry/models/certificates.py new file mode 100644 index 000000000..f726619b7 --- /dev/null +++ b/certificate_license_expiry/models/certificates.py @@ -0,0 +1,212 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from random import randint +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class Certificates(models.Model): + """This will give all about certificates such as fields etc""" + _name = 'certificates' + _description = "Certificates" + _inherit = ["mail.thread", "mail.activity.mixin"] + + state = fields.Selection( + selection=[('new', 'New'), ('active', 'Active'), + ('expired_soon', 'Expired Soon'), ('expired', 'Expired')], + string="State", default='new', help="Sates of certificate") + name = fields.Char(string='Name', required=True, help="Name of certificate") + certificate_number = fields.Char(string="Certificate Number", + readonly=True, copy=False, + default='New', help="Sequence number") + customer_id = fields.Many2one('res.partner', string="Customer", + required=True, help="Name of the customer") + certificates_types_id = fields.Many2one('certificates.types', + string="Certificates Types", + required=True, help="Type of the " + "certificate") + start_date = fields.Date(string="Start Date", required=True, + default=fields.Date.today(), help="Certificate " + "start date") + expire_date = fields.Date(string="Expire Date", help="Certificate expiry " + "date") + issued_company_id = fields.Many2one('res.company', string="Issued By", + required=True, + help="Certificate issued by " + "which company") + certificates_tags_ids = fields.Many2many('certificates.tags', string="Tags", + help="Tags of the certificate") + project_id = fields.Many2one('project.project', string="Project", + required=True, + help="Project corresponding to the " + "certificate") + task_id = fields.Many2one('project.task', string="Task", + domain="[('project_id', '=', project_id)]", + required=True, + help="Task corresponding to the certificate") + product_id = fields.Many2one('product.product', string="Product", + required=True, + help="Product corresponding to the " + "certificate") + user_id = fields.Many2one('res.users', string="Responsible Person", + required=True, + default=lambda self: self.env.user, + help="Responsible user of the certificate") + company_id = fields.Many2one('res.company', string="Company", + default=lambda self: self.env.company, + readonly=True, + help="Company corresponding to the " + "certificate") + expire_remainder_day = fields.Integer(string="Expire Reminder Day", + help="Certificate expire remainder " + "day") + login_user_id = fields.Many2one('res.users', string='Login User', + default=lambda self: self.env.user, + readonly=True, + help="ID of the logged in user") + internal_notes = fields.Text(string="Internal Notes", + help="Internal notes of the certificate") + description = fields.Text(string="Description", required=True, + help="Description of the certificate") + achievements = fields.Text(string="Achievements", + help="Achievements in the certificate") + has_expired = fields.Boolean(string="Expired Certificate", + help="Becomes True if the certificate " + "has expired") + + @api.model + def create(self, vals): + """This is used to get the certificate number""" + if vals.get('certificate_number', 'New') == 'New': + vals['certificate_number'] = self.env['ir.sequence'].next_by_code( + 'certificates') or 'New' + result = super(Certificates, self).create(vals) + return result + + @api.constrains('start_date', 'expire_date') + def _constrains_certificate_start_date_expire_date(self): + """This will give validation at the time of expired date and start + date have any problem""" + if self.start_date and self.expire_date: + if (self.start_date > self.expire_date or fields.Date.today() > + self.expire_date): + raise ValidationError(_('Expire Date Is Not Valid')) + + def active_certificate(self): + """It changes the state into active""" + self.state = 'active' + + def action_active_certificate(self): + """It returns the certificate tree view""" + return { + 'name': 'Active', + 'view_mode': 'tree', + 'res_model': 'certificates', + 'type': 'ir.actions.act_window', + 'domain': [('state', '=', 'active')], + 'context': "{'create': False}" + } + + def certificate_expiry_action(self): + """This function is from scheduled action, it will send mail + notification and change the state based on condition given below""" + certificates = self.env['certificates'].search( + [('has_expired', '=', False)]) + today = fields.Date.today() + for rec in certificates: + if today >= fields.Date.subtract( + rec.expire_date, days=rec.expire_remainder_day): + rec.state = 'expired_soon' + if today >= rec.expire_date and rec.state != 'expired': + email_values = { + 'email_cc': False, + 'auto_delete': True, + 'recipient_ids': [], + 'partner_ids': [], + 'scheduled_date': False, + 'email_to': rec.customer_id.email + } + template = self.env.ref( + 'certificate_license_expiry.email_template_certificate') + template.send_mail(rec.id, force_send=True, + email_values=email_values) + rec.state = 'expired' + rec.has_expired = True + + def action_create_certificate_pdf_report(self): + """This is used to get pdf report and passes the values to template""" + data = { + 'record_name': self.name, + 'record_certificate_number': self.certificate_number, + 'record_customer_name': self.customer_id.name, + 'record_certificate_type': self.certificates_types_id.certificate_type, + 'record_start_date': self.start_date, + 'record_expire_date': self.expire_date, + 'record_issued_by': self.issued_company_id.name, + 'record_project': self.project_id.name, + 'record_task': self.task_id.name, + 'record_user': self.user_id.name, + 'record_company': self.company_id.name, + 'record_internal_notes': self.internal_notes, + 'record_description': self.description, + 'record_achievements': self.achievements, + 'record_expire_remainder_day': self.expire_remainder_day, + 'record_product': self.product_id.name, + 'record_state': self.state + } + return self.env.ref( + 'certificate_license_expiry.action_certificate_report').report_action( + None, data=data) + + +class CertificatesType(models.Model): + """This is certificates type model, it is a sub model of the + certificates""" + _name = 'certificates.types' + _description = "Certificates Type" + _rec_name = 'certificate_type' + + certificate_type = fields.Char(string="Certificate Type", required=True, + help="Type of certificate") + _sql_constraints = [( + 'certificate_type_unique', 'unique(certificate_type)', + 'Already existing certificate type!')] + + +class CertificateTags(models.Model): + """This is certificates tags model, it is a sub model of the + certificates""" + _name = 'certificates.tags' + _description = "Certificate Tag" + _rec_name = 'certificates_tags' + + def _get_default_color(self): + """This will give the colors to the corresponding field""" + return randint(1, 11) + + certificates_tags = fields.Char(string="Certificate Tag", required=True, + help="Tags of certificate") + _sql_constraints = [( + 'certificate_tag_unique', 'unique(certificates_tags)', + 'Already existing certificate tag!')] + color = fields.Integer(string="Color", default=_get_default_color, + help="Color of tags") diff --git a/certificate_license_expiry/models/license.py b/certificate_license_expiry/models/license.py new file mode 100644 index 000000000..88c106050 --- /dev/null +++ b/certificate_license_expiry/models/license.py @@ -0,0 +1,191 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from random import randint +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class License(models.Model): + """This will give all about license such as fields etc""" + _name = 'license' + _description = "License" + _inherit = ["mail.thread", "mail.activity.mixin"] + + state = fields.Selection( + selection=[('new', 'New'), ('active', 'Active'), + ('expired_soon', 'Expired Soon'), ('expired', 'Expired')], + string="State", default='new', help="Sates of certificate") + name = fields.Char(string='Name', required=True, help="Name of certificate") + license_number = fields.Char(string="Certificate Number", readonly=True, + copy=False, default='New', + help="Sequence number") + customer_id = fields.Many2one('res.partner', string="Customer", + required=True, help="Customer") + license_types_id = fields.Many2one('license.types', + string="License Types", required=True, + help="Type of the " + "license") + start_date = fields.Date(string="Start Date", required=True, + default=fields.Date.today(), help="License" + "start date") + expire_date = fields.Date(string="Expire Date", required=True, + default=fields.Date.today(), + help="License expiry " + "date") + issued_company_id = fields.Many2one('res.company', string="Issued By", + required=True, help="License issued by " + "which company") + license_tags_ids = fields.Many2many('license.tags', string="Tags", + help="Tags") + project_id = fields.Many2one('project.project', string="Project", + required=True, help="Project") + task_id = fields.Many2one('project.task', string="Task", + domain="[('project_id', '=', project_id)]", + required=True, help="Task") + product_id = fields.Many2one('product.product', string="Product", + required=True, help="Product") + user_id = fields.Many2one('res.users', string="Responsible Person", + required=True, + default=lambda self: self.env.user, help="User") + company_id = fields.Many2one('res.company', string="Company", + default=lambda self: self.env.company, + readonly=True, help="Company") + expire_remainder_day = fields.Integer(string="Expire Reminder Day", + help="License expire remainder" + "day") + login_user_id = fields.Many2one('res.users', string='Login User', + default=lambda self: self.env.user, + readonly=True, help="Login user") + internal_notes = fields.Text(string="Internal Notes", help="Internal notes") + description = fields.Text(string="Description", help="Description") + achievements = fields.Text(string="Achievements", help="Achievements") + has_expired = fields.Boolean(string="Expired License", + help="Becomes True if the License " + "has expired") + + @api.model + def create(self, vals): + """This is used to get the license number""" + if vals.get('license_number', 'New') == 'New': + vals['license_number'] = self.env['ir.sequence'].next_by_code( + 'license') or 'New' + result = super(License, self).create(vals) + return result + + @api.constrains('start_date', 'expire_date') + def _constrains_license_start_date_expire_date(self): + """This will give validation at the time of expired date and start + date have any problem""" + if self.start_date and self.expire_date: + if self.start_date > self.expire_date or fields.Date.today() > self.expire_date: + raise ValidationError(_('Expire Date Is Not Valid')) + + def active_license(self): + """It changes the state into active""" + self.state = 'active' + + def action_active_license(self): + """It returns the license tree view""" + return { + 'name': 'Active', + 'view_mode': 'tree', + 'res_model': 'license', + 'type': 'ir.actions.act_window', + 'domain': [('state', '=', 'active')], + 'context': "{'create': False}" + } + + def license_expiry_action(self): + """This function is from scheduled action, it will send mail + notification and change the state based on condition given below""" + license = self.env['license'].search([('has_expired', '=', False)]) + today = fields.Date.today() + for rec in license: + if today >= fields.Date.subtract( + rec.expire_date, days=rec.expire_remainder_day): + rec.state = 'expired_soon' + if today >= rec.expire_date and rec.state != 'expired': + email_values = { + 'email_cc': False, + 'auto_delete': True, + 'recipient_ids': [], + 'partner_ids': [], + 'scheduled_date': False, + 'email_to': rec.customer_id.email + } + template = self.env.ref( + 'certificate_license_expiry.email_template_license') + template.send_mail(rec.id, force_send=True, + email_values=email_values) + rec.state = 'expired' + rec.has_expired = True + + def action_create_license_pdf_report(self): + """This is used to get pdf report and passes the values to template""" + data = { + 'record_name': self.name, + 'record_license_number': self.license_number, + 'record_customer': self.customer_id.name, + 'record_license_type': self.license_types_id.license_type, + 'record_start_date': self.start_date, + 'record_expire_date': self.expire_date, + 'record_issued_by_': self.issued_company_id.name, + 'record_project': self.project_id.name, + 'record_task': self.task_id.name, + 'record_user': self.user_id.name, + 'record_company': self.company_id.name, + 'record_internal_notes': self.internal_notes, + 'record_description': self.description, + 'record_achievements': self.achievements, + 'record_expire_remainder_day': self.expire_remainder_day, + 'record_product': self.product_id.name, + 'record_state': self.state + } + return self.env.ref( + 'certificate_license_expiry.action_license_report').report_action( + None, data=data) + + +class LicenseType(models.Model): + """This is license type model, it is a sub model of the license """ + _name = 'license.types' + _description = "License Type" + _rec_name = 'license_type' + + license_type = fields.Char(string="License Type", required=True, + help="Type of license") + + +class LicenseTags(models.Model): + """This is license tags model, it is a sub model of the license """ + _name = 'license.tags' + _description = "License Tag" + _rec_name = 'license_tags_ids' + + def _get_default_color(self): + """This will give the colors to the corresponding field""" + return randint(1, 11) + + license_tags_ids = fields.Char(string="License Tag", required=True, + help="Tags fpr license") + color = fields.Integer(string="Color", default=_get_default_color, + help="Color of tags") diff --git a/certificate_license_expiry/models/res_partner.py b/certificate_license_expiry/models/res_partner.py new file mode 100644 index 000000000..0dd204f13 --- /dev/null +++ b/certificate_license_expiry/models/res_partner.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import models, api, fields + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + certificate_count = fields.Integer(string="Certificate Count", + compute='_compute_total_certificates' + '_count', + help="Count of certificates") + license_count = fields.Integer(string="License Count", + compute='_compute_total_license_count', + help="Count of license") + + @api.depends('license_count') + def _compute_total_certificates_count(self): + """We can get the count of certificates""" + self.certificate_count = self.env[ + 'certificates'].search_count([('customer_id', '=', self.id)]) + + @api.depends('certificate_count') + def _compute_total_license_count(self): + """We can get the count of license""" + self.license_count = self.env[ + 'license'].search_count([('customer_id', '=', self.id)]) + + def show_certificates(self): + """We can see the certificate in tree and form view""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Certificates', + 'view_mode': 'tree,form', + 'res_model': 'certificates', + 'domain': [('customer_id', '=', self.id)], + 'context': "{'create': False}" + } + + def show_license(self): + """We can see the certificate in tree and form view""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'License', + 'view_mode': 'tree,form', + 'res_model': 'license', + 'domain': [('customer_id', '=', self.id)], + 'context': "{'create': False}" + } diff --git a/certificate_license_expiry/report/certificates_reports.xml b/certificate_license_expiry/report/certificates_reports.xml new file mode 100644 index 000000000..8772003a0 --- /dev/null +++ b/certificate_license_expiry/report/certificates_reports.xml @@ -0,0 +1,25 @@ + + + + + Certificate Report + certificates + qweb-pdf + certificate_license_expiry.report_certificates + certificate_license_expiry.report_certificates + report + + + + PDF Report + + + form + code + + action = records.action_create_certificate_pdf_report() + + + diff --git a/certificate_license_expiry/report/certificates_templates.xml b/certificate_license_expiry/report/certificates_templates.xml new file mode 100644 index 000000000..b42a6ded0 --- /dev/null +++ b/certificate_license_expiry/report/certificates_templates.xml @@ -0,0 +1,150 @@ + + + + + diff --git a/certificate_license_expiry/report/license_reports.xml b/certificate_license_expiry/report/license_reports.xml new file mode 100644 index 000000000..56c57dba0 --- /dev/null +++ b/certificate_license_expiry/report/license_reports.xml @@ -0,0 +1,24 @@ + + + + + License Report + license + qweb-pdf + certificate_license_expiry.report_license + certificate_license_expiry.report_license + report + + + + PDF Report + + + form + code + + action = records.action_create_license_pdf_report() + + + diff --git a/certificate_license_expiry/report/license_templates.xml b/certificate_license_expiry/report/license_templates.xml new file mode 100644 index 000000000..591ce9049 --- /dev/null +++ b/certificate_license_expiry/report/license_templates.xml @@ -0,0 +1,150 @@ + + + + + diff --git a/certificate_license_expiry/security/certificates_license_expiry_groups.xml b/certificate_license_expiry/security/certificates_license_expiry_groups.xml new file mode 100644 index 000000000..2386d2a9e --- /dev/null +++ b/certificate_license_expiry/security/certificates_license_expiry_groups.xml @@ -0,0 +1,29 @@ + + + + + Certificates License Expiry + Access For Certificates License Expiry Module + + 10 + + + + Customer + + + + + Manager + + + + + + + + diff --git a/certificate_license_expiry/security/certificates_security.xml b/certificate_license_expiry/security/certificates_security.xml new file mode 100644 index 000000000..0321f1602 --- /dev/null +++ b/certificate_license_expiry/security/certificates_security.xml @@ -0,0 +1,30 @@ + + + + + Certificates Manager + + [(1,'=',1)] + + + + + + + + + + Certificates Customer + + [('customer_id','=',user.partner_id.id)] + + + + + + + + + diff --git a/certificate_license_expiry/security/ir.model.access.csv b/certificate_license_expiry/security/ir.model.access.csv new file mode 100644 index 000000000..17736bda3 --- /dev/null +++ b/certificate_license_expiry/security/ir.model.access.csv @@ -0,0 +1,13 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_certificates1_customer,access.model.certificates.customer,model_certificates,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_certificates_types1_customer,access.model.certificates.types.customer,model_certificates_types,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_certificates_manager,access.model.certificates.manager,model_certificates,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 +access_certificates_types_manager,access.model.certificates.types.manager,model_certificates_types,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 +access_licences1_customer,access.model.license.customer,model_license,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_license_types1_customer,access.model.license.types.customer,model_license_types,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_license_manager,access.model.license.manager,model_license,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 +access_license_types_manager,access.model.license.types.manager,model_license_types,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 +access_license_tags1_customer,access.model.license.tags.customer,model_license_tags,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_certificates_tags1_customer,access.model.certificates.tags.customer,model_certificates_tags,certificate_license_expiry.certificates_license_expiry_group_customer,1,0,0,0 +access_license_tags_manager,access.model.license.tags.manager,model_license_tags,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 +access_certificates_tags_manager,access.model.certificates.tags.manager,model_certificates_tags,certificate_license_expiry.certificate_license_expiry_group_manager,1,1,1,1 diff --git a/certificate_license_expiry/security/license_security.xml b/certificate_license_expiry/security/license_security.xml new file mode 100644 index 000000000..45819f7b3 --- /dev/null +++ b/certificate_license_expiry/security/license_security.xml @@ -0,0 +1,30 @@ + + + + + License Manager + + [(1,'=',1)] + + + + + + + + + + License Customer + + [('customer_id','=',user.partner_id.id)] + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/icons/check.png b/certificate_license_expiry/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/check.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/chevron.png b/certificate_license_expiry/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/chevron.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/cogs.png b/certificate_license_expiry/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/cogs.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/consultation.png b/certificate_license_expiry/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/consultation.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/ecom-black.png b/certificate_license_expiry/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/ecom-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/education-black.png b/certificate_license_expiry/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/education-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/hotel-black.png b/certificate_license_expiry/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/hotel-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/license.png b/certificate_license_expiry/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/license.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/lifebuoy.png b/certificate_license_expiry/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/lifebuoy.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/manufacturing-black.png b/certificate_license_expiry/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/manufacturing-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/pos-black.png b/certificate_license_expiry/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/pos-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/puzzle.png b/certificate_license_expiry/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/puzzle.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/restaurant-black.png b/certificate_license_expiry/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/restaurant-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/service-black.png b/certificate_license_expiry/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/service-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/trading-black.png b/certificate_license_expiry/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/trading-black.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/training.png b/certificate_license_expiry/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/training.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/update.png b/certificate_license_expiry/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/update.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/user.png b/certificate_license_expiry/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/user.png differ diff --git a/certificate_license_expiry/static/description/assets/icons/wrench.png b/certificate_license_expiry/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/certificate_license_expiry/static/description/assets/icons/wrench.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/Cybrosys R.png b/certificate_license_expiry/static/description/assets/misc/Cybrosys R.png new file mode 100755 index 000000000..da4058087 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/Cybrosys R.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/categories.png b/certificate_license_expiry/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/categories.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/check-box.png b/certificate_license_expiry/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/check-box.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/compass.png b/certificate_license_expiry/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/compass.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/corporate.png b/certificate_license_expiry/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/corporate.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/customer-support.png b/certificate_license_expiry/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/customer-support.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/cybrosys-logo.png b/certificate_license_expiry/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/cybrosys-logo.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/email.svg b/certificate_license_expiry/static/description/assets/misc/email.svg new file mode 100755 index 000000000..15291cdc3 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/features.png b/certificate_license_expiry/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/features.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/logo.png b/certificate_license_expiry/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/logo.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/phone.svg b/certificate_license_expiry/static/description/assets/misc/phone.svg new file mode 100755 index 000000000..b7bd7f251 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/certificate_license_expiry/static/description/assets/misc/pictures.png b/certificate_license_expiry/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/pictures.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/pie-chart.png b/certificate_license_expiry/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/pie-chart.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/right-arrow.png b/certificate_license_expiry/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/right-arrow.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/star (1) 2.svg b/certificate_license_expiry/static/description/assets/misc/star (1) 2.svg new file mode 100755 index 000000000..5ae9f507a --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/star.png b/certificate_license_expiry/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/star.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/support (1) 1.svg b/certificate_license_expiry/static/description/assets/misc/support (1) 1.svg new file mode 100755 index 000000000..7d37a8f30 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/support-email.svg b/certificate_license_expiry/static/description/assets/misc/support-email.svg new file mode 100755 index 000000000..eb70370d6 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/support.png b/certificate_license_expiry/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/support.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/tick-mark.svg b/certificate_license_expiry/static/description/assets/misc/tick-mark.svg new file mode 100755 index 000000000..2dbb40187 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/whatsapp 1.svg b/certificate_license_expiry/static/description/assets/misc/whatsapp 1.svg new file mode 100755 index 000000000..0bfaf8fc6 --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/misc/whatsapp.png b/certificate_license_expiry/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/misc/whatsapp.png differ diff --git a/certificate_license_expiry/static/description/assets/misc/whatsapp.svg b/certificate_license_expiry/static/description/assets/misc/whatsapp.svg new file mode 100755 index 000000000..b618aea1d --- /dev/null +++ b/certificate_license_expiry/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/certificate_license_expiry/static/description/assets/modules/01.png b/certificate_license_expiry/static/description/assets/modules/01.png new file mode 100644 index 000000000..614f52534 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/01.png differ diff --git a/certificate_license_expiry/static/description/assets/modules/02.png b/certificate_license_expiry/static/description/assets/modules/02.png new file mode 100644 index 000000000..fcec98d16 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/02.png differ diff --git a/certificate_license_expiry/static/description/assets/modules/03.png b/certificate_license_expiry/static/description/assets/modules/03.png new file mode 100644 index 000000000..0cc9976c4 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/03.png differ diff --git a/certificate_license_expiry/static/description/assets/modules/04.png b/certificate_license_expiry/static/description/assets/modules/04.png new file mode 100644 index 000000000..f259f5e7e Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/04.png differ diff --git a/certificate_license_expiry/static/description/assets/modules/05.png b/certificate_license_expiry/static/description/assets/modules/05.png new file mode 100644 index 000000000..4ddb531ee Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/05.png differ diff --git a/certificate_license_expiry/static/description/assets/modules/06.png b/certificate_license_expiry/static/description/assets/modules/06.png new file mode 100644 index 000000000..ff103a675 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/modules/06.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/hero.gif b/certificate_license_expiry/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..3ec4b9432 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/hero.gif differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s1.png b/certificate_license_expiry/static/description/assets/screenshots/s1.png new file mode 100644 index 000000000..2529bbbd2 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s1.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s10.png b/certificate_license_expiry/static/description/assets/screenshots/s10.png new file mode 100644 index 000000000..8d42d30f6 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s10.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s11.png b/certificate_license_expiry/static/description/assets/screenshots/s11.png new file mode 100644 index 000000000..6655e7bce Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s11.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s12.png b/certificate_license_expiry/static/description/assets/screenshots/s12.png new file mode 100644 index 000000000..686f95217 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s12.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s13.png b/certificate_license_expiry/static/description/assets/screenshots/s13.png new file mode 100644 index 000000000..c6f927f29 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s13.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s14.png b/certificate_license_expiry/static/description/assets/screenshots/s14.png new file mode 100644 index 000000000..7aeadd4de Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s14.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s15.png b/certificate_license_expiry/static/description/assets/screenshots/s15.png new file mode 100644 index 000000000..1c53ad8c6 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s15.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s16.png b/certificate_license_expiry/static/description/assets/screenshots/s16.png new file mode 100644 index 000000000..60e9469d4 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s16.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s2.png b/certificate_license_expiry/static/description/assets/screenshots/s2.png new file mode 100644 index 000000000..f26bbe9e0 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s2.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s3.png b/certificate_license_expiry/static/description/assets/screenshots/s3.png new file mode 100644 index 000000000..1a983d6be Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s3.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s4.png b/certificate_license_expiry/static/description/assets/screenshots/s4.png new file mode 100644 index 000000000..68ae6bc1c Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s4.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s5.png b/certificate_license_expiry/static/description/assets/screenshots/s5.png new file mode 100644 index 000000000..5d666701f Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s5.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s6.png b/certificate_license_expiry/static/description/assets/screenshots/s6.png new file mode 100644 index 000000000..ea946f9d8 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s6.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s7.png b/certificate_license_expiry/static/description/assets/screenshots/s7.png new file mode 100644 index 000000000..10a8f9524 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s7.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s8.png b/certificate_license_expiry/static/description/assets/screenshots/s8.png new file mode 100644 index 000000000..a316c33b6 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s8.png differ diff --git a/certificate_license_expiry/static/description/assets/screenshots/s9.png b/certificate_license_expiry/static/description/assets/screenshots/s9.png new file mode 100644 index 000000000..16081e5c8 Binary files /dev/null and b/certificate_license_expiry/static/description/assets/screenshots/s9.png differ diff --git a/certificate_license_expiry/static/description/banner.jpg b/certificate_license_expiry/static/description/banner.jpg new file mode 100644 index 000000000..19262a79a Binary files /dev/null and b/certificate_license_expiry/static/description/banner.jpg differ diff --git a/certificate_license_expiry/static/description/icon.png b/certificate_license_expiry/static/description/icon.png new file mode 100644 index 000000000..2915c6cfe Binary files /dev/null and b/certificate_license_expiry/static/description/icon.png differ diff --git a/certificate_license_expiry/static/description/index.html b/certificate_license_expiry/static/description/index.html new file mode 100644 index 000000000..b966557cc --- /dev/null +++ b/certificate_license_expiry/static/description/index.html @@ -0,0 +1,966 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Certificate And License With Expiry Management +

+

+ Managing certificate and license. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Allows you to manage licenses and receive license expiry notifications. You can manage your customers' licenses.

+
+
+
+
+
+
+ +
+
+

+ Allows you to manage certificate and expiration notifications. You can manage your customers' certificates.

+
+
+
+
+
+
+ +
+
+

+ Send a notification to remind you that your certificate and licenses have expired. +

+
+
+
+
+
+
+ +
+
+

+ The certificate and license form documents can be attached by the manager. +

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

+ Certificate And License Menu +

+
+
+
+
+
+
+ +
+
+

+ Active Certificate +

+
+
+
+
+
+
+ +
+
+

+ Certificate PDF Report Button +

+
+
+
+
+
+
+ +
+
+

+ Certificate PDF Report +

+
+
+
+
+
+
+ +
+
+

+ Certificate Cron Job For Notification And Expired Soon +

+
+
+
+
+
+
+ +
+
+

+ Certificate Expired Remainder Notification +

+
+
+
+
+
+
+ +
+
+

+ Certificate Expired Soon Based On Expired Remainder Day +

+
+
+
+
+
+
+ +
+
+

+ Certificate Portal +

+
+
+
+
+
+
+ +
+
+

+ Certificate Portal Search And Group By +

+
+
+
+
+
+
+ +
+
+

+ Certificate Portal Search +

+
+
+
+
+
+
+ +
+
+

+ Certificate Portal Group By -> Type +

+
+
+
+
+
+
+ +
+
+

+ Certificate Portal Group By -> Tags +

+
+
+
+
+
+
+ +
+
+

+ Certificate And License Of Corresponding Partner +

+
+
+
+
+
+
+ +
+
+

+ Certificate And License Manager +

+
+
+
+
+
+
+ +
+
+

+ Certificate And License Customer +

+
+
+
+
+
+
+ +
+
+

+ Certificate And License Customer View -> Customer Can Only See + Their Own Certificate. +

+
+
+
+
+
+
+
    +
  • + The certificate and license form documents can be attached by the manager. +
  • +
  • + + Allows you to manage licenses and receive license expiry notifications. You can manage your customers' licenses +
  • +
  • + + Allows you to manage certificate and expiration notifications. You can manage your customers' certificates. +
  • +
  • + + Send a notification to remind you that your certificate and licenses have expired. +
  • +
  • + + In the backend, customers can view their own documents for the certificate and license form. +
  • +
  • + + Customers can view their own certificates and licenses in the frontend my account portal by logging in with their + portal credentials. +
  • +
  • + + Allows you to obtain a PDF report for your certificate and license. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:11th September 2024 +
+

+ Initial commit for Certificate And License With Expiry Management.

+
+
+
+
+
+
+
+

+ 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/certificate_license_expiry/static/src/css/certificate_license.css b/certificate_license_expiry/static/src/css/certificate_license.css new file mode 100644 index 000000000..b86756ba1 --- /dev/null +++ b/certificate_license_expiry/static/src/css/certificate_license.css @@ -0,0 +1,3 @@ +.certificate-stat-button{ + color:green; +} diff --git a/certificate_license_expiry/static/src/js/certificates_group_by.js b/certificate_license_expiry/static/src/js/certificates_group_by.js new file mode 100644 index 000000000..2fd3f684a --- /dev/null +++ b/certificate_license_expiry/static/src/js/certificates_group_by.js @@ -0,0 +1,22 @@ +/** @odoo-module */ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.certificateGroup = publicWidget.Widget.extend({ + + selector: '.search_group_by_certificates', + events : { + 'click #group_select_certificates' : '_onChangeCertificates' + + }, +// This is for getting group value of certificates + _onChangeCertificates: function(){ + var self = this; + var searchValue = self.$el.find("#group_select_certificates").val(); + jsonrpc('/certificatesgroupby', { + 'search_value': searchValue, + }).then(function(result) { + self.__parentedParent.$el.find(".search_certificates").html(result); + }); + } +}) \ No newline at end of file diff --git a/certificate_license_expiry/static/src/js/certificates_search.js b/certificate_license_expiry/static/src/js/certificates_search.js new file mode 100644 index 000000000..8bdcd0f23 --- /dev/null +++ b/certificate_license_expiry/static/src/js/certificates_search.js @@ -0,0 +1,21 @@ +/** @odoo-module */ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.certificateSearch = publicWidget.Widget.extend({ + selector: '.search_group_by_certificates', + events : { + 'click #search_certificates' : '_onClickCertificates' + + }, + // This is for getting search value of certificates + _onClickCertificates: function(){ + let self = this + var search_value = self.$el.find("#certificates_search_box").val(); + jsonrpc('/certificatesearch',{ + 'search_value': search_value, + }).then(function(result) { + self.__parentedParent.$el.find(".search_certificates").html(result); + }); + } +}) \ No newline at end of file diff --git a/certificate_license_expiry/static/src/js/license_group_by.js b/certificate_license_expiry/static/src/js/license_group_by.js new file mode 100644 index 000000000..d2cd7e202 --- /dev/null +++ b/certificate_license_expiry/static/src/js/license_group_by.js @@ -0,0 +1,22 @@ +/** @odoo-module */ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.licenseGroup = publicWidget.Widget.extend({ + + selector: '.search_group_by_license', + events : { + 'change #group_select_license' : '_onChangeLicense' + + }, + // This is for getting group value of license + _onChangeLicense: function(){ + let self = this + var search_value = self.$el.find("#group_select_license").val(); + jsonrpc('/licensegroupby',{ + 'search_value': search_value, + }).then(function(result) { + self.__parentedParent.$el.find(".search_license").html(result); + }); + } +}) \ No newline at end of file diff --git a/certificate_license_expiry/static/src/js/license_search.js b/certificate_license_expiry/static/src/js/license_search.js new file mode 100644 index 000000000..9e1425f39 --- /dev/null +++ b/certificate_license_expiry/static/src/js/license_search.js @@ -0,0 +1,21 @@ +/** @odoo-module */ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.licenseSearch = publicWidget.Widget.extend({ + selector: '.search_group_by_license', + events : { + 'click #search_license' : '_onClickLicense' + + }, + // This is for getting search value of license + _onClickLicense: function(){ + let self = this + var search_value = self.$el.find("#license_search_box").val(); + jsonrpc('/licensesearch',{ + 'search_value': search_value, + }).then(function(result) { + self.__parentedParent.$el.find(".search_license").html(result); + }); + } +}) \ No newline at end of file diff --git a/certificate_license_expiry/views/certificates_license_menus.xml b/certificate_license_expiry/views/certificates_license_menus.xml new file mode 100644 index 000000000..b2318d011 --- /dev/null +++ b/certificate_license_expiry/views/certificates_license_menus.xml @@ -0,0 +1,134 @@ + + + + + + + Certificates + certificates + tree,form,kanban,calendar,graph + {'search_default_my_certificates': 0} + + + + + + + + Licenses + license + tree,form,kanban,calendar,graph + {'search_default_my_licences': 0} + + + + + + My Certificates + certificates + tree,form,kanban,calendar,graph + {'search_default_my_certificates': 1} + + + + + + + + My Licenses + license + tree,form,kanban,calendar,graph + {'search_default_my_licences': 1} + + + + + + Certificates Types + certificates.types + tree,form + + + + + + + + + + License Types + license.types + tree,form + + + + + + + + License Tags + license.tags + tree,form + + + + + + Certificates Tags + certificates.tags + tree,form + + + + diff --git a/certificate_license_expiry/views/certificates_portal.xml b/certificate_license_expiry/views/certificates_portal.xml new file mode 100644 index 000000000..d8aed6660 --- /dev/null +++ b/certificate_license_expiry/views/certificates_portal.xml @@ -0,0 +1,281 @@ + + + + + + + + + + + + + diff --git a/certificate_license_expiry/views/certificates_search.xml b/certificate_license_expiry/views/certificates_search.xml new file mode 100644 index 000000000..e6873682e --- /dev/null +++ b/certificate_license_expiry/views/certificates_search.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/certificate_license_expiry/views/certificates_views.xml b/certificate_license_expiry/views/certificates_views.xml new file mode 100644 index 000000000..3a0b7fb59 --- /dev/null +++ b/certificate_license_expiry/views/certificates_views.xml @@ -0,0 +1,294 @@ + + + + + certificates.view.tree + certificates + + + + + + + + + + + + + + + + + + + + + + + certificates.view.form + certificates + +
+
+ + +
+ +
+ +
+

+
+ +
+
+ +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + + certificates.view.search + certificates + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + certificates.view.kanban + certificates + + + + + + + + + +
+
+
+ + + + +
+ + + +
+ + + +
+ +
+
+
+
+
+
+
+ + + certificates.view.calender + certificates + + + + + + + + + + + + + + + + + + certificates.view.graph + certificates + + + + + + + + + + + + + + + + + certificates.types.view.tree + certificates.types + + + + + + + + + certificates.types.view.search + certificates.types + + + + + + + + + certificates.tags.view.tree + certificates.tags + + + + + + + + + + certificates.tags.view.search + certificates.tags + + + + + + + +
diff --git a/certificate_license_expiry/views/license_portal.xml b/certificate_license_expiry/views/license_portal.xml new file mode 100644 index 000000000..3014ff3a5 --- /dev/null +++ b/certificate_license_expiry/views/license_portal.xml @@ -0,0 +1,282 @@ + + + + + + + + + + + + + diff --git a/certificate_license_expiry/views/license_search.xml b/certificate_license_expiry/views/license_search.xml new file mode 100644 index 000000000..7ab54e1b5 --- /dev/null +++ b/certificate_license_expiry/views/license_search.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/certificate_license_expiry/views/license_views.xml b/certificate_license_expiry/views/license_views.xml new file mode 100644 index 000000000..9d34eeef6 --- /dev/null +++ b/certificate_license_expiry/views/license_views.xml @@ -0,0 +1,292 @@ + + + + + license.view.tree + license + + + + + + + + + + + + + + + + + + + + + + + license.view.form + license + +
+
+ + +
+ +
+ +
+

+
+ +
+
+ +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + + license.view.search + license + + + + + + + + + + + + + + + + + + + + + + + + + + + + + license.view.kanban + license + + + + + + + + + +
+
+
+ + + + +
+ +
+ + + +
+ +
+
+
+
+
+
+
+ + + license.view.calender + license + + + + + + + + + + + + + + + + + + license.view.graph + license + + + + + + + + + + + + + + + + + license.types.tree + license.types + + + + + + + + + license.types.search + license.types + + + + + + + + + license.view.tree + license.tags + + + + + + + + + + license.view.search + license.tags + + + + + + +
diff --git a/certificate_license_expiry/views/res_partner_views.xml b/certificate_license_expiry/views/res_partner_views.xml new file mode 100644 index 000000000..caba5bb62 --- /dev/null +++ b/certificate_license_expiry/views/res_partner_views.xml @@ -0,0 +1,26 @@ + + + + + + res.partner.view.inherit.form.certificate_license_expiry + + res.partner + + +
+ + +
+
+
+