Browse Source

Aug 12: [FIX] Bug Fixed 'employee_late_check_in'

pull/332/merge
Cybrosys Technologies 9 months ago
parent
commit
3ff18b913d
  1. 10
      employee_late_check_in/README.rst
  2. 12
      employee_late_check_in/__init__.py
  3. 14
      employee_late_check_in/__manifest__.py
  4. 12
      employee_late_check_in/models/__init__.py
  5. 14
      employee_late_check_in/models/hr_attendance.py
  6. 12
      employee_late_check_in/models/hr_employee.py
  7. 12
      employee_late_check_in/models/hr_employees_public.py
  8. 12
      employee_late_check_in/models/hr_payslip.py
  9. 12
      employee_late_check_in/models/late_check_in.py
  10. 12
      employee_late_check_in/models/res_company.py
  11. 12
      employee_late_check_in/models/res_config_settings.py

10
employee_late_check_in/README.rst

@ -1,6 +1,6 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg .. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: LGPL-3 :alt: License: AGPL-3
Employee Late Check-in Employee Late Check-in
====================== ======================
@ -16,8 +16,8 @@ Company
License License
------- -------
* Lesser General Public License, Version 3 (LGPL v3). * Affero General Public License, Version 3 (AGPL v3).
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits Credits
------- -------

12
employee_late_check_in/__init__.py

@ -6,17 +6,17 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from . import models from . import models

14
employee_late_check_in/__manifest__.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
{ {
'name': 'Employee Late Check-in', 'name': 'Employee Late Check-in',
'version': '16.0.1.0.0', 'version': '16.0.1.0.0',
@ -49,7 +49,7 @@
'views/hr_payslip_views.xml', 'views/hr_payslip_views.xml',
], ],
'images': ['static/description/banner.png'], 'images': ['static/description/banner.png'],
'license': 'LGPL-3', 'license': 'AGPL-3',
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,
'application': False, 'application': False,

12
employee_late_check_in/models/__init__.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from . import hr_attendance from . import hr_attendance
from . import hr_employee from . import hr_employee
from . import hr_employees_public from . import hr_employees_public

14
employee_late_check_in/models/hr_attendance.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
import pytz import pytz
from datetime import datetime, timedelta from datetime import datetime, timedelta
from odoo import api,fields, models from odoo import api,fields, models
@ -76,11 +76,9 @@ class HrAttendance(models.Model):
max_limit = int(self.env['ir.config_parameter'].sudo().get_param( max_limit = int(self.env['ir.config_parameter'].sudo().get_param(
'employee_late_check_in.maximum_minutes')) or 0 'employee_late_check_in.maximum_minutes')) or 0
for rec in self.sudo().search([]): for rec in self.sudo().search([]):
print(rec,minutes_after)
if rec.id not in self.env['late.check.in'].sudo().search( if rec.id not in self.env['late.check.in'].sudo().search(
[]).attendance_id.ids: []).attendance_id.ids:
if minutes_after < rec.late_check_in < max_limit: if minutes_after < rec.late_check_in < max_limit:
print(rec,'rec')
self.env['late.check.in'].sudo().create({ self.env['late.check.in'].sudo().create({
'employee_id': rec.employee_id.id, 'employee_id': rec.employee_id.id,
'late_minutes': rec.late_check_in, 'late_minutes': rec.late_check_in,

12
employee_late_check_in/models/hr_employee.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import _, fields, models from odoo import _, fields, models

12
employee_late_check_in/models/hr_employees_public.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import _, fields, models from odoo import _, fields, models

12
employee_late_check_in/models/hr_payslip.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import api, fields, models from odoo import api, fields, models

12
employee_late_check_in/models/late_check_in.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import api, fields, models from odoo import api, fields, models

12
employee_late_check_in/models/res_company.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import fields, models from odoo import fields, models

12
employee_late_check_in/models/res_config_settings.py

@ -6,19 +6,19 @@
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) # Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################. #############################################################################
from odoo import fields, models from odoo import fields, models

Loading…
Cancel
Save