fix
This commit is contained in:
parent
f2fdc84125
commit
fcb225a421
|
|
@ -2155,14 +2155,15 @@ msgstr "الغياب"
|
|||
|
||||
#. module: attendances
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.view_attendance_transaction_filter
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.attendance_view_filter
|
||||
msgid "My Attendance"
|
||||
msgstr "حضوري"
|
||||
|
||||
#. module: attendances
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.view_attendance_transaction_filter
|
||||
msgid "Attendance"
|
||||
msgstr "الحضور"
|
||||
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.attendance_view_filter
|
||||
msgid "Attendance Today"
|
||||
msgstr "حضور اليوم"
|
||||
|
||||
#. module: hr_base
|
||||
#: model:ir.model.fields,field_description:hr_base.field_resource_calendar__approval_by
|
||||
|
|
|
|||
|
|
@ -1243,7 +1243,8 @@ class HrAttendanceTransactions(models.Model):
|
|||
|
||||
""" Notification Today No Sign In On time """
|
||||
today_records = self.search([('date', '=', today),('employee_id.finger_print','=',True),
|
||||
('public_holiday','=',False)])
|
||||
('public_holiday','=',False),('normal_leave','=',False),
|
||||
('is_official','=',False)])
|
||||
today_template_id = self.env.ref('attendances.attendance_notification_today_sign_in').id
|
||||
for item in today_records:
|
||||
if item.sign_in==0:
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<filter name="group_branch" string="Branch" domain="[]" context="{'group_by': 'is_branch'}"/>
|
||||
</group>
|
||||
<separator/>
|
||||
<filter string="Attendance" name="today_less" domain="[('date','<=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="Attendance Today" name="today_less" domain="[('date','<=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator/>
|
||||
<separator/>
|
||||
<filter string="My Attendance" name="my_attendance" domain="[('employee_id.user_id', '=', uid)]"/>
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@
|
|||
<field name="name">Employee Attendances</field>
|
||||
<field name="res_model">attendance.attendance</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name= "context">{"search_default_today_less":1}</field>
|
||||
</record>
|
||||
|
||||
<record id="attendance_custom_form" model="ir.ui.view">
|
||||
|
|
@ -329,6 +330,12 @@
|
|||
<filter name="group_department" string="Department" domain="[]" context="{'group_by': 'department_id'}"/>
|
||||
<filter name="group_branch" string="Branch" domain="[]" context="{'group_by': 'is_branch'}"/>
|
||||
<separator/>
|
||||
|
||||
<filter string="Attendance Today" name="today_less" domain="[('action_date','<=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator/>
|
||||
<separator/>
|
||||
<filter string="My Attendance" name="my_attendance" domain="[('employee_id.user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ class HRHolidays(models.Model):
|
|||
if self.is_last_day_of_year(current_date):
|
||||
dutartion = 0
|
||||
this_year_balance = 0
|
||||
if item.number_of_save_days >= 0:
|
||||
if item.number_of_save_days > 0:
|
||||
dutartion = item.number_of_save_days
|
||||
if is_years:
|
||||
open_year = datetime(current_date.year - 1, 12, 31).date()
|
||||
|
|
@ -544,7 +544,7 @@ class HRHolidays(models.Model):
|
|||
for index in range(1, days_diff):
|
||||
open_year_date = open_year + timedelta(days=index)
|
||||
dutartion += self.remaining_leaves_of_day_by_date(emp, str(open_year_date), item , is_month=False, is_years=False)
|
||||
if already_exist.remaining_leaves > dutartion:
|
||||
if already_exist.remaining_leaves - dutartion > dutartion:
|
||||
dutartion = dutartion + this_year_balance
|
||||
already_exist.write({'remaining_leaves': dutartion})
|
||||
@api.model
|
||||
|
|
|
|||
|
|
@ -234,9 +234,9 @@
|
|||
<xpath expr="//field[@name='holiday_type']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<field name="state" position="after">
|
||||
<field name="state" position="before">
|
||||
<field name="return_from_leave"/>
|
||||
<field name="canceled_duration"/>
|
||||
<!--field name="canceled_duration"/-->
|
||||
</field>
|
||||
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Reference in New Issue