diff --git a/website_maintenance_hr/README.rst b/website_maintenance_hr/README.rst new file mode 100644 index 000000000..34a094c02 --- /dev/null +++ b/website_maintenance_hr/README.rst @@ -0,0 +1,34 @@ + +Website Maintenance Request V12 +=============================== + +This module allows an employee to send maintenance requests for work equipments through website. +An email will also be sent to the employee regarding the details of request. + +Depends +======= +[base], [website],[mail], [hr_maintenance] addons Odoo + + +Installation +============ + +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developers: v12.0 - SAURABH PV + + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/website_maintenance_hr/__init__.py b/website_maintenance_hr/__init__.py new file mode 100644 index 000000000..27ca78099 --- /dev/null +++ b/website_maintenance_hr/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:SAURABH P V() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +from . import controllers diff --git a/website_maintenance_hr/__manifest__.py b/website_maintenance_hr/__manifest__.py new file mode 100644 index 000000000..d15e3c0e6 --- /dev/null +++ b/website_maintenance_hr/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:SAURABH P V() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': 'Website Maintenance Request', + 'summary': """Creates maintenance requests from website and notify the employee by e-mail""", + 'version': '12.0.1.0.0', + 'description': """Creates maintenance requests from website and notify the employee by e-mail""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Website', + 'depends': ['website', 'mail', 'hr_maintenance'], + 'license': 'AGPL-3', + 'data': [ + 'views/templates.xml', + 'views/views.xml', + 'views/mail_template.xml' + ], + 'images': ['static/description/banner.png'], + 'installable': True, + 'auto_install': False, + +} \ No newline at end of file diff --git a/website_maintenance_hr/controllers/__init__.py b/website_maintenance_hr/controllers/__init__.py new file mode 100644 index 000000000..61f7fdc8e --- /dev/null +++ b/website_maintenance_hr/controllers/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:SAURABH P V() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import controllers \ No newline at end of file diff --git a/website_maintenance_hr/controllers/controllers.py b/website_maintenance_hr/controllers/controllers.py new file mode 100644 index 000000000..f8676106e --- /dev/null +++ b/website_maintenance_hr/controllers/controllers.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:SAURABH P V() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import http +from odoo.http import request +from werkzeug.utils import redirect + + +class MaintenanceRequest(http.Controller): + + @http.route(['/maintenance_request'], method="post", type='http', auth='user', website=True, csrf=False) + def request(self, **post): + """ + Browses all maintenance teams and equipments in backend and returns them to the web page + """ + maintenance_requests = request.env['maintenance.equipment'].sudo().search([]) + maintenance_team = request.env['maintenance.team'].sudo().search([]) + user = request.env.user.id + employee = request.env['hr.employee'].sudo().search([('user_id', '=', user)]) + request_dict = [] + team_name = [] + for record in maintenance_requests: + name = record.name + request_dict.append({'id': record.id, 'name': name}) + for record in maintenance_team: + name = record.name + team_name.append({'id': record.id, 'name': name}) + + if employee: + return http.request.render('website_maintenance_hr.Maintenance', { + 'equipment_selection': request_dict, + 'team_selection': team_name, + }) + return redirect('/maintenance_request-nouser') + + @http.route('/submit', method='post', type='http', auth='public', website=True, csrf=False) + def send_request(self, **post): + """ + Searches for related employee of the currently logged in user. + The maintenance request is only created if the logged in user is an employee + """ + user = request.env.user.id + employee = request.env['hr.employee'].sudo().search([('user_id', '=', user)]) + if employee: + values = { + 'name': post['subject'], + 'maintenance_team_id': post['teams'], + 'equipment_id': post['equipment'], + 'description': post['details'], + 'priority': post['stars'], + 'employee_id': employee.id + + } + request_id = request.env['maintenance.request'].sudo().create(values) + template = request.env.ref('website_maintenance_hr.mail_template_maintenance_request') + template.sudo().send_mail(request_id.id, force_send=True) + + return redirect('/maintenance_request-thanks') + else: + return redirect('/maintenance_request-nouser') diff --git a/website_maintenance_hr/doc/RELEASE_NOTES.md b/website_maintenance_hr/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..4d809589b --- /dev/null +++ b/website_maintenance_hr/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.11.2019 +#### Version 12.0.1.0.0 +#### ADD +Initial Commit diff --git a/website_maintenance_hr/static/description/banner.png b/website_maintenance_hr/static/description/banner.png new file mode 100644 index 000000000..5b41943f0 Binary files /dev/null and b/website_maintenance_hr/static/description/banner.png differ diff --git a/website_maintenance_hr/static/description/icon.png b/website_maintenance_hr/static/description/icon.png new file mode 100644 index 000000000..d59f9d09d Binary files /dev/null and b/website_maintenance_hr/static/description/icon.png differ diff --git a/website_maintenance_hr/static/description/images/banner_buy_now_button.png b/website_maintenance_hr/static/description/images/banner_buy_now_button.png new file mode 100644 index 000000000..645173ad8 Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_buy_now_button.png differ diff --git a/website_maintenance_hr/static/description/images/banner_export_stockinfo_xls.jpeg b/website_maintenance_hr/static/description/images/banner_export_stockinfo_xls.jpeg new file mode 100644 index 000000000..5dfdf2c2b Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_export_stockinfo_xls.jpeg differ diff --git a/website_maintenance_hr/static/description/images/banner_inventory_barcode_scanning.jpeg b/website_maintenance_hr/static/description/images/banner_inventory_barcode_scanning.jpeg new file mode 100644 index 000000000..86c66b6c2 Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_inventory_barcode_scanning.jpeg differ diff --git a/website_maintenance_hr/static/description/images/banner_portal_leave_request.png b/website_maintenance_hr/static/description/images/banner_portal_leave_request.png new file mode 100644 index 000000000..e6fc7a42f Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_portal_leave_request.png differ diff --git a/website_maintenance_hr/static/description/images/banner_website_coupon.jpg b/website_maintenance_hr/static/description/images/banner_website_coupon.jpg new file mode 100644 index 000000000..32924c0a7 Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_website_coupon.jpg differ diff --git a/website_maintenance_hr/static/description/images/banner_website_product_attachments.png b/website_maintenance_hr/static/description/images/banner_website_product_attachments.png new file mode 100644 index 000000000..79e3a7bd8 Binary files /dev/null and b/website_maintenance_hr/static/description/images/banner_website_product_attachments.png differ diff --git a/website_maintenance_hr/static/description/images/checked.png b/website_maintenance_hr/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/website_maintenance_hr/static/description/images/checked.png differ diff --git a/website_maintenance_hr/static/description/images/cybrosys.png b/website_maintenance_hr/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/website_maintenance_hr/static/description/images/cybrosys.png differ diff --git a/website_maintenance_hr/static/description/images/website.gif b/website_maintenance_hr/static/description/images/website.gif new file mode 100644 index 000000000..b0a9c79c5 Binary files /dev/null and b/website_maintenance_hr/static/description/images/website.gif differ diff --git a/website_maintenance_hr/static/description/images/website_maintenance_hr_1.png b/website_maintenance_hr/static/description/images/website_maintenance_hr_1.png new file mode 100644 index 000000000..992b43726 Binary files /dev/null and b/website_maintenance_hr/static/description/images/website_maintenance_hr_1.png differ diff --git a/website_maintenance_hr/static/description/images/website_maintenance_hr_2.png b/website_maintenance_hr/static/description/images/website_maintenance_hr_2.png new file mode 100644 index 000000000..de7cef891 Binary files /dev/null and b/website_maintenance_hr/static/description/images/website_maintenance_hr_2.png differ diff --git a/website_maintenance_hr/static/description/images/website_maintenance_hr_3.png b/website_maintenance_hr/static/description/images/website_maintenance_hr_3.png new file mode 100644 index 000000000..002c2bf91 Binary files /dev/null and b/website_maintenance_hr/static/description/images/website_maintenance_hr_3.png differ diff --git a/website_maintenance_hr/static/description/images/website_maintenance_hr_4.png b/website_maintenance_hr/static/description/images/website_maintenance_hr_4.png new file mode 100644 index 000000000..a8a824967 Binary files /dev/null and b/website_maintenance_hr/static/description/images/website_maintenance_hr_4.png differ diff --git a/website_maintenance_hr/static/description/images/website_maintenance_hr_5.png b/website_maintenance_hr/static/description/images/website_maintenance_hr_5.png new file mode 100644 index 000000000..06e01187d Binary files /dev/null and b/website_maintenance_hr/static/description/images/website_maintenance_hr_5.png differ diff --git a/website_maintenance_hr/static/description/index.html b/website_maintenance_hr/static/description/index.html new file mode 100644 index 000000000..a1f06da99 --- /dev/null +++ b/website_maintenance_hr/static/description/index.html @@ -0,0 +1,321 @@ +
cybrosys-logo
+
+
+
+

Website Equipment Maintenance Request

+

Request Equipment Maintenance from Website

+
+

Key Highlights

+
    +
  • checkCreates Maintenance Request from Website.
  • +
+
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

+ An employee can send a maintenance request for work pieces of equipment through your website. An e-mail regarding the details of maintenance request will be sent to the employee's work e-mail. A new maintenance request will automatically be created by an employee inside the maintenance module. Only the users who are employees can send the maintenance requests. +

+
+
+ +

Website Equipment Maintenance Request

+
+
    +
  • + checkRequest Equipment Maintenance from Website. +
  • +
  • + checkAutomatically creates Maintenance Request in backend. +
  • +
  • + checkSends e-mail of Maintenance Request details to employee. +
  • +
+
+ +
+
+

Screenshots

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

Suggested Products

+
+ +
+
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

+
+
+
+
+
+ +
+
+
+

Need Any Help?

+
+

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+
+
+

Contact Us

+ www.cybrosys.com +
+
+
+
+
+
+
+
+
+ +
+ + + + + + + +
+
+
+ \ No newline at end of file diff --git a/website_maintenance_hr/views/mail_template.xml b/website_maintenance_hr/views/mail_template.xml new file mode 100644 index 000000000..5fee53841 --- /dev/null +++ b/website_maintenance_hr/views/mail_template.xml @@ -0,0 +1,23 @@ + + + + + Maintenance: Reception Acknowledgment + + Maintenance of ${object.equipment_id.name} + ${(object.employee_id.work_email)} + + Dear ${object.employee_id.name},

+ Thank you for getting in touch with us.
+ We have received your request for the maintenance of ${object.equipment_id.name} and we are working on it.
+ Our ${object.maintenance_team_id.name} team will get in touch with you shortly. +

+ Thank you,

+ ${object.company_id.name} +
+ ]]> +
+
+
+
\ No newline at end of file diff --git a/website_maintenance_hr/views/templates.xml b/website_maintenance_hr/views/templates.xml new file mode 100644 index 000000000..e6a89fdb0 --- /dev/null +++ b/website_maintenance_hr/views/templates.xml @@ -0,0 +1,150 @@ + + + + + + + Thanks + qweb + /maintenance_request-thanks + True + + + +
+
+
+

Thank You

+
+
+
+ Your maintenance request has been submitted successfully. + +
+
+
+ +
+
+
+
+ + + + + + + No User + qweb + /maintenance_request-nouser + True + + + +
+
+
+

We're Sorry.!

+
+
+
+ You cannot send maintenance request to us since you are not a registered employee. + +
+
+
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/website_maintenance_hr/views/views.xml b/website_maintenance_hr/views/views.xml new file mode 100644 index 000000000..a080a41a0 --- /dev/null +++ b/website_maintenance_hr/views/views.xml @@ -0,0 +1,9 @@ + + + + Maintenance + /maintenance_request + + 63 + + \ No newline at end of file