Merge pull request #3686 from expsa/bakry_hr

Bakry hr
This commit is contained in:
bakry 2025-06-29 15:08:15 +03:00 committed by GitHub
commit 082e00b718
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -73,6 +73,8 @@ class AttendancesReport(models.TransientModel):
# return self.env.ref(report_ref).report_action(self, data=self._payload())
def print_excel_report(self):
if not self.employee_ids:
raise ValidationError(_("Please select Employees Name"))
return self.env.ref("attendances.general_attendance_action_xls").report_action(self, data=self._payload(), config=False)
class ReportAttendancePublic(models.AbstractModel):

View File

@ -732,6 +732,7 @@ msgstr "الإدارات المفوضة"
#: model_terms:ir.ui.view,arch_db:hr_holidays_public.public_leave_cost_report
#: model_terms:ir.ui.view,arch_db:hr_holidays_public.specified_leave_report_template
#: model_terms:ir.ui.view,arch_db:hr_holidays_public.view_hr_holidays_filter2
#: model_terms:ir.ui.view,arch_db:hr_holidays_public.leaves_balance_tree_view
#, python-format
msgid "Department"
msgstr "الهيكل الإداري"
@ -943,6 +944,7 @@ msgstr "نوع الموظف"
#. module: hr_holidays_public
#: model:ir.model.fields,field_description:hr_holidays_public.field_hr_holidays__emp_number
#: model_terms:ir.ui.view,arch_db:hr_holidays_public.leaves_balance_tree_view
msgid "Employee number"
msgstr "رقم الموظف"

View File

@ -112,9 +112,9 @@
<field name="model">hr.holidays</field>
<field name="arch" type="xml">
<tree create="false" edit="false" delete="false">
<field name="emp_number" string="Employee number"/>
<field name="employee_id" string="Employee"/>
<field name="department_id" />
<field name="department_id" string="Department" optional="hide"/>
<field name="holiday_status_id" string="Leave Type"/>
<field name="state" invisible="1"/>
<field name="leaves_taken" string="Leaves Taken"/>