diff --git a/hr_attendance_xlsx_report/README.rst b/hr_attendance_xlsx_report/README.rst new file mode 100644 index 000000000..473fa0b56 --- /dev/null +++ b/hr_attendance_xlsx_report/README.rst @@ -0,0 +1,36 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Employee Attendance Xlsx Report +======================= +This module helps to manage the attendance report of employees in xlsx. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: LAJINA K V @cybrosys, 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: ``__ \ No newline at end of file diff --git a/hr_attendance_xlsx_report/__init__.py b/hr_attendance_xlsx_report/__init__.py new file mode 100644 index 000000000..8319d00e2 --- /dev/null +++ b/hr_attendance_xlsx_report/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: LAJINA KV (odoo@cybrosys.com) +# +# 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 controller +from . import wizard + + diff --git a/hr_attendance_xlsx_report/__manifest__.py b/hr_attendance_xlsx_report/__manifest__.py new file mode 100644 index 000000000..c95a713f9 --- /dev/null +++ b/hr_attendance_xlsx_report/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: LAJINA KV (odoo@cybrosys.com) +# +# 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': "Employee Attendance Xlsx Report", + 'version': '14.0.1.0.0', + 'category': 'Human Resources/Attendances', + 'summary': """This module will manage the attendance report of employees in xlsx""", + 'description': """TThis module helps to generate the attendance report of employees in the + XLSX format""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['hr_attendance'], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/employee_attendance_report_views.xml', + 'views/action_manager.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/hr_attendance_xlsx_report/controller/__init__.py b/hr_attendance_xlsx_report/controller/__init__.py new file mode 100644 index 000000000..56b724914 --- /dev/null +++ b/hr_attendance_xlsx_report/controller/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: LAJINA KV (odoo@cybrosys.com) +# +# 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 hr_attendance_xlsx_report + diff --git a/hr_attendance_xlsx_report/controller/hr_attendance_xlsx_report.py b/hr_attendance_xlsx_report/controller/hr_attendance_xlsx_report.py new file mode 100644 index 000000000..6025ec750 --- /dev/null +++ b/hr_attendance_xlsx_report/controller/hr_attendance_xlsx_report.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: LAJINA KV (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +import json +from odoo import http +from odoo.http import content_disposition, request, serialize_exception +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + """Xlsx Report controller""" + @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], + csrf=False) + def get_report_xlsx(self, model, options, output_format, report_name): + """xlsx report""" + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + options = json.loads(options) + token = 'dummy-because-api-expects-one' + try: + if output_format == 'xlsx': + response = request.make_response( + None, + headers=[ + ('Content-Type', 'application/vnd.ms-excel'), + ('Content-Disposition', content_disposition(report_name + '.xlsx')) + ] + ) + report_obj.get_xlsx_report(options, response) + response.set_cookie('fileToken', token) + return response + except Exception as e: + se = serialize_exception(e) + error = { + 'code': 200, + 'message': 'Odoo Server Error', + 'data': se + } + return request.make_response(html_escape(json.dumps(error))) diff --git a/hr_attendance_xlsx_report/doc/RELEASE_NOTES.md b/hr_attendance_xlsx_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..3e919fe0d --- /dev/null +++ b/hr_attendance_xlsx_report/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 12.04.2023 +#### Version 14.0.1.0.0 +#### ADD + +- Initial commit for Employee Attendance Xlsx Report \ No newline at end of file diff --git a/hr_attendance_xlsx_report/security/ir.model.access.csv b/hr_attendance_xlsx_report/security/ir.model.access.csv new file mode 100644 index 000000000..17479b06e --- /dev/null +++ b/hr_attendance_xlsx_report/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_employee_attendance_report,access.employee_attendance_report,model_employee_attendance_report,base.group_user,1,1,1,1 + diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/check.png b/hr_attendance_xlsx_report/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/check.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/chevron.png b/hr_attendance_xlsx_report/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/chevron.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/cogs.png b/hr_attendance_xlsx_report/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/cogs.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/consultation.png b/hr_attendance_xlsx_report/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/consultation.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/ecom-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/ecom-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/education-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/education-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/hotel-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/hotel-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/license.png b/hr_attendance_xlsx_report/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/license.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/lifebuoy.png b/hr_attendance_xlsx_report/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/lifebuoy.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/logo.png b/hr_attendance_xlsx_report/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/logo.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/manufacturing-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/manufacturing-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/pos-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/pos-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/puzzle.png b/hr_attendance_xlsx_report/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/puzzle.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/restaurant-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/restaurant-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/service-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/service-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/trading-black.png b/hr_attendance_xlsx_report/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/trading-black.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/training.png b/hr_attendance_xlsx_report/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/training.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/update.png b/hr_attendance_xlsx_report/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/update.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/user.png b/hr_attendance_xlsx_report/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/user.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/icons/wrench.png b/hr_attendance_xlsx_report/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/icons/wrench.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/approval_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/approval_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/dynamic_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/dynamic_image.png new file mode 100644 index 000000000..f55c47e0f Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/dynamic_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/list_view_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/list_view_image.png new file mode 100644 index 000000000..510d36ae9 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/list_view_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/multiple_ref_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/multiple_ref_image.png new file mode 100644 index 000000000..3fe90e552 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/multiple_ref_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/print_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/print_image.png new file mode 100644 index 000000000..b470725a1 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/print_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/modules/product_return_image.png b/hr_attendance_xlsx_report/static/description/assets/modules/product_return_image.png new file mode 100644 index 000000000..3afc14722 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/modules/product_return_image.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/screenshots/hero.gif b/hr_attendance_xlsx_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6c495ae66 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/screenshots/hero.gif differ diff --git a/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx1.png b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx1.png new file mode 100644 index 000000000..df59503ed Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx1.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx2.png b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx2.png new file mode 100644 index 000000000..c84d216d8 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx2.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx3.png b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx3.png new file mode 100644 index 000000000..426a26679 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx3.png differ diff --git a/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx4.png b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx4.png new file mode 100644 index 000000000..748488383 Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/assets/screenshots/xlsx4.png differ diff --git a/hr_attendance_xlsx_report/static/description/banner.png b/hr_attendance_xlsx_report/static/description/banner.png new file mode 100644 index 000000000..614d78ebc Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/banner.png differ diff --git a/hr_attendance_xlsx_report/static/description/icon.png b/hr_attendance_xlsx_report/static/description/icon.png new file mode 100644 index 000000000..2bafd278f Binary files /dev/null and b/hr_attendance_xlsx_report/static/description/icon.png differ diff --git a/hr_attendance_xlsx_report/static/description/index.html b/hr_attendance_xlsx_report/static/description/index.html new file mode 100644 index 000000000..99087e870 --- /dev/null +++ b/hr_attendance_xlsx_report/static/description/index.html @@ -0,0 +1,617 @@ +
+
+
+
+ +
+
+
+ Community +
+
+
+
+
+ +
+
+
+

+ Employee Attendance Xlsx Report

+

+ This module helps to manage the attendance report of employees +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This module helps to manage the attendance report of employee. + The report will show the working hours of each employee with the dates. + Easily identify the employee is present or not and half day working , + by giving specific colors for each working.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Attendance report of all employees

+
+
+ +
+
+ +
+
+

+ Attendance report of one specific employee

+
+
+ +
+ +
+
+

+ Screenshots +

+
+
+

Choose date range from wizard.

+

+ Go to Attendance -> Reporting -> Attendance Report

+ +
+ +
+

+ Attendance report of all employees. +

+ +
+ +
+

+ Choose date range and employee from wizard. +

+ +
+ + +
+

+ Attendance report of a chosen employee with a specified date range. +

+ +
+
+ +
+
+

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/hr_attendance_xlsx_report/static/src/js/action_manager.js b/hr_attendance_xlsx_report/static/src/js/action_manager.js new file mode 100644 index 000000000..c07adfd85 --- /dev/null +++ b/hr_attendance_xlsx_report/static/src/js/action_manager.js @@ -0,0 +1,44 @@ +odoo.define('attendance.action_manager', function (require) { +"use strict"; +/** +* Purpose is to add actions of type +* 'ir.actions.report' to the ActionManager +*/ +var ActionManager = require('web.ActionManager'); +var framework = require('web.framework'); +var session = require('web.session'); +ActionManager.include({ + /** +* Executes actions of type 'ir.actions.report'. +* +* @private +* @param {Object} action the description of the action to execute +* @param {Object} options @see doAction for details +* @returns {Promise} resolved when the action has been executed +*/ + _executexlsxReportDownloadAction: function (action) { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + }, + /** + * Overrides to handle the 'ir.actions.report' actions. + * + * @override + * @private + */ + _handleAction: function (action, options) { + if (action.report_type === 'xlsx') { + return this._executexlsxReportDownloadAction(action, options); + } + return this._super.apply(this, arguments); + }, + }); + }); \ No newline at end of file diff --git a/hr_attendance_xlsx_report/views/action_manager.xml b/hr_attendance_xlsx_report/views/action_manager.xml new file mode 100644 index 000000000..765f39b43 --- /dev/null +++ b/hr_attendance_xlsx_report/views/action_manager.xml @@ -0,0 +1,11 @@ + + + +