Merge pull request #3915 from expsa/you_dev_odex25_mobile

restrict check-in outside allowed working hours
This commit is contained in:
kchyounes19 2025-07-15 11:42:38 +01:00 committed by GitHub
commit 8aae66021a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 43 additions and 1 deletions

View File

@ -28,6 +28,7 @@
'views/hr_employee_view.xml',
'views/firebase_notifications.xml',
'views/firebase_registration.xml',
'views/resource_calendar.xml',
'wizard/firebase_registration_wizard.xml',
'templates/terms.xml',
'data/zone_crone.xml',

View File

@ -2374,3 +2374,13 @@ msgstr "ساعات الحضور"
#, python-format
msgid "Dear employee, your working hours have not started yet."
msgstr "عزيزي الموظف دوام العمل لم يبدا بعد"
#. module: odex_mobile
#: model:ir.model.fields,field_description:odex_mobile.field_resource_calendar__grace_hour_after_work
msgid "Grace Hours After Work"
msgstr "ساعات السماحية بعد الدوام"
#. module: odex_mobile
#: model:ir.model.fields,field_description:odex_mobile.field_resource_calendar__grace_hour_before_work
msgid "Grace Hours Before Work"
msgstr "ساعات السماحية قبل الدوم"

View File

@ -8,4 +8,5 @@ from . import firebase_registration
from . import res_partner
from . import hr_firebase_notification
from . import base
from . import ir_property
from . import ir_property
from . import resource

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
grace_hour_before_work = fields.Float(string="Grace Hours Before Work")
grace_hour_after_work = fields.Float(string="Grace Hours After Work")

View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<odoo>
<data>
<record id="resource_calendar_grace_inherited_form" model="ir.ui.view">
<field name="name">resource.calendar.inherited.form</field>
<field name="model">resource.calendar</field>
<field name="inherit_id" ref="attendances.resource_calendar_inherited_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@id='sign_out_period']" position="after">
<group colspan="2">
<field name="grace_hour_before_work" widget="float_time"/>
</group>
<group colspan="2">
<field name="grace_hour_after_work" widget="float_time"/>
</group>
</xpath>
</field>
</record>
</data>
</odoo>