diff --git a/.github/workflows/production_pull_code.yml b/.github/workflows/production_pull_code.yml index 3aa0018b1..50c9a2497 100644 --- a/.github/workflows/production_pull_code.yml +++ b/.github/workflows/production_pull_code.yml @@ -15,6 +15,7 @@ on: - Twahod-Project - Ekram-Project - Sahli-Project + - Sahli-Stage-Project jobs: # Cyber Project @@ -116,4 +117,18 @@ jobs: sudo chmod +x ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh sudo ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.SAHLI_PROJECT_USER }} ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }} ${{ secrets.SAHLI_PROD_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/} ${{ secrets.GH_TOKEN }} + sahli_stage_master_server: + name: Deploy to Sahli Stage Master + runs-on: sahli-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Sahli-Stage-Project' && (github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_project') + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}" + mkdir -p ~/master_branch_sha + echo "$(date '+%Y-%m-%d %H:%M:%S') - ${{ github.sha }}" >> ~/master_branch_sha/${GITHUB_REF#refs/heads/}-stage + sudo chmod +x ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh + sudo ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.SAHLI_PROJECT_USER }} ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }} ${{ secrets.SAHLI_STAGE_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/} ${{ secrets.GH_TOKEN }} + + diff --git a/odex25_hr/attendances/__manifest__.py b/odex25_hr/attendances/__manifest__.py index fd58db060..141af9ea0 100644 --- a/odex25_hr/attendances/__manifest__.py +++ b/odex25_hr/attendances/__manifest__.py @@ -8,7 +8,8 @@ 'website': 'http://exp-sa.com', 'license': 'GPL-3', 'author': 'Expert Co. Ltd.' , - 'depends': ['base', 'hr_attendance', 'report_xlsx','hr_base','exp_payroll_custom'], + 'depends': ['base', 'hr_attendance', 'report_xlsx','hr_base','exp_payroll_custom',], + # hr_holidays_public 'data': [ 'security/attendance_security.xml', 'security/ir.model.access.csv', diff --git a/odex25_hr/attendances/models/hr_attendance_report.py b/odex25_hr/attendances/models/hr_attendance_report.py index 019e85d72..2ee23461c 100644 --- a/odex25_hr/attendances/models/hr_attendance_report.py +++ b/odex25_hr/attendances/models/hr_attendance_report.py @@ -126,11 +126,15 @@ class HrAttendanceReport(models.Model): working_hours = office_hours + permission_hours + mission_hours + mission_by_days_hours + leave_hours missed_hours = planed_hours - working_hours + missing_punch_transactions = transactions.filtered( lambda t: ( - (t.sign_in and not t.sign_out) or - (not t.sign_in and t.sign_out) or - (not t.sign_in and not t.sign_out and t.office_hours > 0) + not t.public_holiday and + not t.normal_leave and + ( + (t.sign_in and not t.sign_out) or + (not t.sign_in and t.sign_out) + ) ) ) @@ -286,9 +290,20 @@ class HrAttendanceReport(models.Model): hours += attendance.official_hours extra_break_duration += attendance.break_duration additional_hours += attendance.additional_hours - if (attendance.sign_in and not attendance.sign_out) or ( - not attendance.sign_in and attendance.sign_out): - missing_punch_hours = attendance.plan_hours - attendance.official_hours + + if ( + not attendance.public_holiday and + not attendance.normal_leave and + ( + (attendance.sign_in and not attendance.sign_out) or + (not attendance.sign_in and attendance.sign_out) + ) + ): + missing_punch_hours = ( + attendance.plan_hours - attendance.official_hours + if attendance.plan_hours > attendance.official_hours + else 0.0 + ) if attendance.is_absent: actual_absent_hours +=attendance.plan_hours diff --git a/odex25_hr/attendances/models/hr_attendance_transactions.py b/odex25_hr/attendances/models/hr_attendance_transactions.py index cc69d9312..1adab0ca2 100644 --- a/odex25_hr/attendances/models/hr_attendance_transactions.py +++ b/odex25_hr/attendances/models/hr_attendance_transactions.py @@ -41,6 +41,9 @@ class HrAttendanceTransactions(models.Model): has_sign_in = fields.Boolean(readonly=True) has_sign_out = fields.Boolean(readonly=True) + total_mission_hours = fields.Float() + total_permission_hours = fields.Float() + '''to_date = fields.Boolean(string='Today',compute='_attendance_today', store=True) diff --git a/odex25_hr/employee_requests/i18n/ar_001.po b/odex25_hr/employee_requests/i18n/ar_001.po index d52d21a9d..8f5b2290b 100644 --- a/odex25_hr/employee_requests/i18n/ar_001.po +++ b/odex25_hr/employee_requests/i18n/ar_001.po @@ -396,6 +396,71 @@ msgstr "بند الصرف" msgid "Accounting" msgstr "الحسابات" + + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name +#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form +msgid "Name" +msgstr "الاسم " + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active +#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form +msgid "Active" +msgstr "نشط " + + +#. module: employee_requests +#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form +msgid "HR Classification" +msgstr "التصنيف" + + + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name +msgid "Classification" +msgstr "التصنيف" + + + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name +msgid "Name" +msgstr "الاسم " + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active +msgid "Active" +msgstr "نشط " + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name +msgid "Classification" +msgstr "التصنيف" + + + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name +msgid "Name" +msgstr "الاسم " + +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active +msgid "Active" +msgstr "نشط " + + + +#. module: employee_requests +#: model:ir.actions.act_window,name:employee_requests.employee_hr_classification_actionn +#: model:ir.ui.menu,name:employee_requests.hr_classification_menu_item +msgid "HR Classifications" +msgstr "إعداد التصنيف" + + #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_employee_department_jobs__message_needaction #: model:ir.model.fields,field_description:employee_requests.field_employee_effective_form__message_needaction @@ -964,6 +1029,11 @@ msgstr "المعالين" msgid "Destination" msgstr "الجهــــه" +#. module: employee_requests +#: model:ir.model.fields,field_description:employee_requests.field_employee_other_request__classification_id +msgid "Classification" +msgstr "التصنيف" + #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_salary_destination__english_name msgid "English Name" @@ -3989,3 +4059,7 @@ msgstr "يجب إدخال إسم دفتر اليومية لإعدادات الع msgid "Employee %s, has no Overtime Account Setting Base On Employee Type." msgstr "الموظف %s, ليس لديه إعدادات حساب بند صرف للأجر الإضافي حسب نوع الموظف." + + + + diff --git a/odex25_hr/employee_requests/models/other_request.py b/odex25_hr/employee_requests/models/other_request.py index 4cf14cc55..71960bf1e 100644 --- a/odex25_hr/employee_requests/models/other_request.py +++ b/odex25_hr/employee_requests/models/other_request.py @@ -9,6 +9,7 @@ class EmployeeOtherRequest(models.Model): _rec_name = 'employee_id' _description = 'Other Request' _inherit = ['mail.thread', 'mail.activity.mixin'] + _order = 'date desc' from_hr = fields.Boolean() date = fields.Date(default=lambda self: fields.Date.today()) @@ -52,6 +53,7 @@ class EmployeeOtherRequest(models.Model): is_branch = fields.Many2one(related='department_id.branch_name', store=True, readonly=True) + classification_id = fields.Many2one('hr.classification',string ='Classification') def print_with_details(self): return self.env.ref('employee_requests.action_report_employee_identification').report_action(self) @@ -91,36 +93,40 @@ class EmployeeOtherRequest(models.Model): if item.request_type == 'dependent': if not item.employee_dependant: raise exceptions.Warning(_('Please The dependents were not Included')) - #if item.employee_id.contract_id.contract_status == 'single': #raise exceptions.Warning(_('You can not Add Fimaly record Because Employee is Single')) else: for rec in item.employee_dependant: if not rec.attachment: raise exceptions.Warning(_('Please Insert dependents Attachments Files Below!')) + + item.state = "submit" + + if item.request_type == 'qualification': if not item.qualification_employee: raise exceptions.Warning(_('Please The qualification or certification were not Insert Below!')) - for rec in item.qualification_employee: if not rec.attachment: raise exceptions.Warning(_('Please Insert Attachments Files Below!')) else: item.state = "submit" - if item.request_type == 'certification': if not item.certification_employee: raise exceptions.Warning(_('Please The qualification or certification were not Insert Below!')) - for rec in item.certification_employee: if not rec.attachment: raise exceptions.Warning(_('Please Insert Attachments Files Below!')) else: item.state = "submit" + else: - item.state = "submit" + if item.request_type in ['suggestion', 'complaint']: + item.state = "submit" + else: + item.state = "confirm" def confirm(self): #self.state = 'confirm' @@ -252,7 +258,14 @@ class Qualification(models.Model): # Hr_Employee_Certification -class HrCertification(models.Model): +class HrCerti(models.Model): _inherit = 'hr.certification' request_id = fields.Many2one('employee.other.request') + +class HrCclassification(models.Model): + _name = 'hr.classification' + _rec_name = 'name' + + name = fields.Char(string='Name') # Translatable + active = fields.Boolean(default=True, string='Active') diff --git a/odex25_hr/employee_requests/security/ir.model.access.csv b/odex25_hr/employee_requests/security/ir.model.access.csv index b4c340054..31dab8c9d 100644 --- a/odex25_hr/employee_requests/security/ir.model.access.csv +++ b/odex25_hr/employee_requests/security/ir.model.access.csv @@ -19,3 +19,5 @@ access_degree_medical_issuance_hr,degree_medical_issuance_hr,model_degree_medica access_degree_medical_issuance_emp,degree_medical_issuance_emp,model_degree_medical_issuance,base.group_user,1,0,0,0 access_salary_destination_hr,salary_destination_hr,model_salary_destination,hr.group_hr_user,1,1,1,1 access_salary_destination_emp,salary_destination_emp,model_salary_destination,base.group_user,1,0,0,0 + +access_hr_classification,hr_classification,model_hr_classification,base.group_user,1,1,1,1 diff --git a/odex25_hr/employee_requests/views/employee_effective_form.xml b/odex25_hr/employee_requests/views/employee_effective_form.xml index 31fdb30f0..bec443d24 100644 --- a/odex25_hr/employee_requests/views/employee_effective_form.xml +++ b/odex25_hr/employee_requests/views/employee_effective_form.xml @@ -49,6 +49,7 @@ + - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - + + + + + + + + + + - - + - - + + + - + - + - + - - - + + + - - - - - - -
-
- - - - - - + + + +
+
+ + + + + + - - - - - + readonly="1" + force_save="1" /> + + + + - + readonly="1" + force_save="1" /> - + - - - + + + - - + - - - - - - - - - - - - + +
+ +
+ + + + + + + + + - - - - + + + + - - - - - - + + + + + + - + -
+
- -
-
- - - -
- - - + +
+
+ + + +
+ + + - - Employee Training Course - hr.official.mission.employee - - - - - - - - - - - - - - - - - diff --git a/odex25_hr/hr_holidays_public/views/leaves_balance.xml b/odex25_hr/hr_holidays_public/views/leaves_balance.xml index 8eab9a45a..da5141efc 100644 --- a/odex25_hr/hr_holidays_public/views/leaves_balance.xml +++ b/odex25_hr/hr_holidays_public/views/leaves_balance.xml @@ -10,59 +10,47 @@ - - hr.holidays.tree.no.delete - hr.holidays - - - - false - false - false - - - - - - hr.holidays.form.no.delete - hr.holidays - - -
- false - false - false -
-
-
Leaves Balance hr.holidays tree,form - [('type','=','add'),('check_allocation_view','=','balance')] - {'search_default_employee_id': [active_id], 'default_employee_id': active_id, 'search_default_group_type': 1, - 'search_default_year': 1} + {'default_type':'add', 'default_check_allocation_view': 'balance'} + - + + + + + + + + + + + + + + + + hr.employee.leave.form.inherit.custom hr.employee - - %(hr_holidays_public.leaves_balancee_action)d - + + %(hr_holidays_public.leaves_balance_action)d + {'search_default_employee_id': active_id} + + + @@ -74,6 +62,11 @@ + + + + + Leaves Balance hr.holidays