Merge pull request #535 from expsa/preprod_odex25_hr

Preprod odex25 hr
This commit is contained in:
bakry 2024-08-05 16:04:56 +03:00 committed by GitHub
commit b2f545776b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 2 deletions

View File

@ -2088,3 +2088,13 @@ msgstr "القسم"
msgid "Absent"
msgstr "الغياب"
#. module: attendances
#: model_terms:ir.ui.view,arch_db:attendances.view_attendance_transaction_filter
msgid "My Attendance"
msgstr "حضوري"
#. module: attendances
#: model_terms:ir.ui.view,arch_db:attendances.view_attendance_transaction_filter
msgid "Attendance"
msgstr "الحضور"

View File

@ -104,8 +104,8 @@
<record id="view_attendance_transaction_filter" model="ir.ui.view">
<field name="name">Attendance Transaction</field>
<field name="model">hr.attendance.transaction</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search>
<field name="employee_id"/>
<field name="employee_number"/>
<field name="department_id" />
@ -114,6 +114,15 @@
<filter name="group_department" string="Department" domain="[]" context="{'group_by': 'department_id'}"/>
<filter name="group_absent" string="Absent" domain="[]" context="{'group_by': 'is_absent'}"/>
</group>
<separator/>
<filter string="My Attendance" name="my_attendance" domain="[('employee_id.user_id', '=', uid)]"/>
<separator/>
<separator/>
<filter string="Attendance" name="today_less" domain="[('date','&lt;=',time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>
</search>
</field>
</record>
</data>

View File

@ -25,7 +25,7 @@ _logger = logging.getLogger(__name__)
def format_date(env, value, lang_code=False, date_format=False):
if not value:
return ''
if isinstance(value, pycompat.string_types):
if isinstance(value, str):
if len(value) < DATE_LENGTH:
return ''
if len(value) > DATE_LENGTH: