fix
This commit is contained in:
parent
b95da98763
commit
a59515a3d5
|
|
@ -447,6 +447,8 @@ msgstr "التاخيرات"
|
|||
#: model_terms:ir.ui.view,arch_db:attendances.attendance_custom_form
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.attendance_custom_tree
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.attendance_view_filter
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_tree_view
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_form_view
|
||||
#, python-format
|
||||
msgid "Department"
|
||||
msgstr "الهيكل الإداري"
|
||||
|
|
@ -525,6 +527,7 @@ msgstr ""
|
|||
#: model_terms:ir.ui.view,arch_db:attendances.hr_lateness_tree_view
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_filter
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_reasons_lateness_filter
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_tree_view
|
||||
msgid "Employee"
|
||||
msgstr "الموظف"
|
||||
|
||||
|
|
@ -682,6 +685,7 @@ msgstr "من تاريخ"
|
|||
#. module: attendances
|
||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_register__from_hr_depart
|
||||
#: model:ir.model.fields,field_description:attendances.field_hr_reasons_lateness__from_hr_depart
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_form_view
|
||||
msgid "Another Employee"
|
||||
msgstr "من موظف آخر"
|
||||
|
||||
|
|
@ -847,6 +851,8 @@ msgstr "دوام كامل؟"
|
|||
|
||||
#. module: attendances
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_lateness_tree_view
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_tree_view
|
||||
#: model_terms:ir.ui.view,arch_db:attendances.hr_attendance_register_form_view
|
||||
msgid "Job"
|
||||
msgstr "المسمى الوظيفي"
|
||||
|
||||
|
|
@ -1966,13 +1972,13 @@ msgstr ""
|
|||
|
||||
#. module: attendances
|
||||
#: model:ir.model.fields.selection,name:attendances.selection__hr_attendance_register__action_type__sign_out
|
||||
msgid "تسجيل الخروج"
|
||||
msgstr ""
|
||||
msgid "Sign Out"
|
||||
msgstr "تسجيل الخروج"
|
||||
|
||||
#. module: attendances
|
||||
#: model:ir.model.fields.selection,name:attendances.selection__hr_attendance_register__action_type__sign_in
|
||||
msgid "تسجيل الدخول"
|
||||
msgstr ""
|
||||
msgid "Sign In"
|
||||
msgstr "تسجيل الدخول"
|
||||
|
||||
#. module: attendances
|
||||
#: model:ir.model.fields.selection,name:attendances.selection__hr_attendance_report__state__confirmed
|
||||
|
|
@ -2083,6 +2089,7 @@ msgstr ""
|
|||
#. module: attendances
|
||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_transaction__company_id
|
||||
#: model:ir.model.fields,field_description:attendances.field_attendance_attendance__company_id
|
||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_register__company_id
|
||||
msgid "Company"
|
||||
msgstr "الشركة"
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class HrAttendanceRegister(models.Model):
|
|||
('refused', _('Refused'))], default="draft",tracking=True)
|
||||
date = fields.Date(string='Date')
|
||||
|
||||
company_id = fields.Many2one(related='employee_id.company_id')
|
||||
company_id = fields.Many2one(related='employee_id.company_id',string='Company')
|
||||
|
||||
is_branch = fields.Many2one(related='department_id.branch_name', store=True, readonly=True)
|
||||
|
||||
|
|
@ -61,8 +61,8 @@ class HrAttendanceRegister(models.Model):
|
|||
priv_register = self.env['hr.attendance.register'].search([('employee_id', '=', item.employee_id.id),('id','!=',item.id)])
|
||||
for reg in priv_register:
|
||||
date = datetime.strptime(str(reg.action_date), '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d')
|
||||
if date == currnt_date:
|
||||
raise exceptions.Warning(_('You can not Register Attendance More Than once in The Same day'))
|
||||
#if date == currnt_date:
|
||||
# raise exceptions.Warning(_('You can not Register Attendance More Than once in The Same day'))
|
||||
|
||||
if currnt_date > str(item.register_date):
|
||||
raise exceptions.Warning(_('You can not Register Attendance At Future Date'))
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@
|
|||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="from_hr_depart" string="Another Employee" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="from_hr_depart" string="Another Employee" attrs="{'readonly':[('state','!=','draft')]}"
|
||||
groups="hr.group_hr_user,hr_base.group_division_manager"/>
|
||||
<field name="employee_id" string="Employee" domain="[('state','=','open')]"
|
||||
attrs="{'readonly': ['|',('from_hr_depart','=',False),('state','!=','draft')],'required':True}"/>
|
||||
<field name="employee_no" string="Employee Number" readonly="1"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue