From e73d846d428168e86ff4cacf9435699a914caedc Mon Sep 17 00:00:00 2001 From: Bakry Date: Sun, 29 Dec 2024 16:29:21 +0300 Subject: [PATCH] fix --- odex25_hr/employee_requests/i18n/ar_001.po | 35 +- .../models/hr_personal_permission.py | 27 +- .../report/report_employee_identification.py | 4 +- .../report/report_employee_identification1.py | 4 +- .../report/report_employee_identification2.py | 4 +- .../report/report_employee_identify.xml | 301 ++++++++---------- .../report/report_employee_identify_2.xml | 94 +++--- .../report/report_employee_identify_3.xml | 87 +++-- .../report/salary_confirmation.xml | 4 +- .../security/employee_requests_security.xml | 4 +- .../views/employee_request_menu.xml | 2 +- .../views/hr_personal_permission.xml | 4 +- 12 files changed, 248 insertions(+), 322 deletions(-) diff --git a/odex25_hr/employee_requests/i18n/ar_001.po b/odex25_hr/employee_requests/i18n/ar_001.po index b24940243..cb896374d 100644 --- a/odex25_hr/employee_requests/i18n/ar_001.po +++ b/odex25_hr/employee_requests/i18n/ar_001.po @@ -490,7 +490,7 @@ msgstr "إخلاء الطرف من البنك" #: model_terms:ir.ui.view,arch_db:employee_requests.employee_personal_permission_form_view #, python-format msgid "HR Approve" -msgstr "تصديق الموارد البشرية" +msgstr "موافقة الموارد البشرية" #. module: employee_requests #: code:addons/employee_requests/models/house_allowance_advance.py:0 @@ -939,7 +939,7 @@ msgstr "مدير الهيكل الإداري :" #: model_terms:ir.ui.view,arch_db:employee_requests.employee_overtime_request_form_view #, python-format msgid "Department Manager" -msgstr "تصديق مدير الإدارة" +msgstr "موافقة مدير الإدارة" #. module: employee_requests #: code:addons/employee_requests/models/employee_department_jobs.py:0 @@ -1005,7 +1005,7 @@ msgstr "انتظار الموارد البشرية :" #: model_terms:ir.ui.view,arch_db:employee_requests.employee_request_effective_form_view #: model_terms:ir.ui.view,arch_db:employee_requests.employee_other_request_form_view msgid "Direct Manager Approve" -msgstr "تصديق المدير المباشر" +msgstr "موافقة المدير المباشر" #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_hr_clearance_form__direct_mg @@ -1432,6 +1432,12 @@ msgstr "" msgid "Filename" msgstr "اسم الملف" +#. module: employee_requests +#: code:addons/employee_requests/models/hr_clearance_form.py:0 +#, python-format +msgid "Final Clearance" +msgstr "خروج نهائية" + #. module: employee_requests #: model_terms:ir.ui.view,arch_db:employee_requests.clearance_report_template msgid "Finance Control." @@ -1548,7 +1554,7 @@ msgstr "الكفالة" #: model_terms:ir.ui.view,arch_db:employee_requests.employee_other_request_form_view #, python-format msgid "HR Approval" -msgstr "تصديق الموارد البشرية" +msgstr "موافقة الموارد البشرية" #. module: employee_requests #: model:ir.model,name:employee_requests.model_hr_certification @@ -1558,12 +1564,13 @@ msgstr "" #. module: employee_requests #: model_terms:ir.ui.view,arch_db:employee_requests.employee_request_effective_form_view msgid "HR M Approve" -msgstr "تصديق الموارد البشرية" +msgstr "موافقة الموارد البشرية" #. module: employee_requests #: code:addons/employee_requests/models/employee_department_jobs.py:0 #: code:addons/employee_requests/models/other_request.py:0 #: model_terms:ir.ui.view,arch_db:employee_requests.employee_department_jobs_form_view +#: model:ir.model.fields.selection,name:employee_requests.selection__hr_personal_permission_type__approval_by__hr_manager #, python-format msgid "HR Manager" msgstr "مدير الموارد البشرية" @@ -3401,6 +3408,7 @@ msgid "Submit" msgstr "إرســـال" #. module: employee_requests +#:model:ir.model.fields.selection,name:employee_requests.selection__hr_personal_permission_type__approval_by__direct_manager #: model_terms:ir.ui.view,arch_db:employee_requests.employee_clearance_form_form_view msgid "Direct Manager" msgstr "موافقة المدير المباشر" @@ -3626,7 +3634,7 @@ msgstr "" #: model:ir.model.fields.selection,name:employee_requests.selection__hr_clearance_form__hr_mg__approve #: model:ir.model.fields.selection,name:employee_requests.selection__hr_clearance_form__it_mg__approve #: model:ir.model.fields.selection,name:employee_requests.selection__hr_clearance_form__super_mg__approve -msgid "تصديق الموارد البشرية" +msgid "موافقة الموارد البشرية" msgstr "" #. module: employee_requests @@ -3922,6 +3930,13 @@ msgstr "لايمكن طلب عمل إضافي للموظف %s بقيمة عمل msgid "You can not Request Overtime The Employee %s The Overtime Amount Zero" msgstr "لايمكن طلب عمل إضافي للموظف %s بقيمة عمل إضافي صفر." + +#. module: employee_requests +#: code:addons/employee_requests/models/employee_overtime_request.py:0 +#, python-format +msgid "Sorry, Cannot Be Request after %s Days From The End Of The Overtime Month" +msgstr "للأسف,لا يمكن طلب العمل الإضافى بعد أكثر من %s يوم من نهاية شهر العمل الأضافي" + #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_hr_personal_permission_type__approval_by msgid "Approval By" @@ -3957,11 +3972,3 @@ msgstr "ساعات شهرية" #, python-format msgid "Date To must be on the same day as Date From." msgstr "يجب أن يكون يوم تاريخ البداية هو نفسه يوم تاريخ النهاية." - -#. module: employee_requests -#: code:addons/employee_requests/models/employee_overtime_request.py:0 -#, python-format -msgid "Sorry, Cannot Be Request after %s Days From The End Of The Overtime Month" -msgstr "للأسف,لا يمكن طلب العمل الإضافى بعد أكثر من %s يوم من نهاية شهر العمل الأضافي" - - diff --git a/odex25_hr/employee_requests/models/hr_personal_permission.py b/odex25_hr/employee_requests/models/hr_personal_permission.py index 9a7614ede..55bc7dd6a 100644 --- a/odex25_hr/employee_requests/models/hr_personal_permission.py +++ b/odex25_hr/employee_requests/models/hr_personal_permission.py @@ -41,27 +41,6 @@ class HrPersonalPermission(models.Model): company_id = fields.Many2one('res.company',string="Company", default=lambda self: self.env.user.company_id) is_branch = fields.Many2one(related='department_id.branch_name', store=True, readonly=True) - time_from = fields.Float(compute='_compute_times') - time_to = fields.Float(compute='_compute_times') - - - - @api.depends('date_from', 'date_to') - def _compute_times(self): - for rec in self: - if rec.date_from: - tf = rec.date_from.time() - rec.time_from = tf.hour + tf.minute / 60 - else: - rec.time_from = 0.0 - if rec.date_to: - tt = rec.date_to.time() - rec.time_to = tt.hour + tt.minute / 60 - else: - rec.time_to = False - - - # time_permission_from = fields.Float(string="Permission From (24h format)", help="Time in 24-hour format (e.g., 13.5 for 1:30 PM)") # time_permission_to = fields.Float(string="Permission To (24h format)", help="Time in 24-hour format (e.g., 15.75 for 3:45 PM)") @@ -362,13 +341,13 @@ class HrPersonalPermission(models.Model): if item.duration > item.permission_number: raise exceptions.Warning( _('This Duration not Allowed it must be Less Than or equal Permission Hours in Month')) - for employee_permission in employee_permissions: + for employee_permission in employee_permissions.filtered(lambda r: r.id != self.id): if employee_permission.date_to and item.date_to: permission_date = datetime.strptime(str(employee_permission.date_to), DEFAULT_SERVER_DATETIME_FORMAT).date() date_to_value = datetime.strptime(str(item.date_to), DEFAULT_SERVER_DATETIME_FORMAT).date() - if permission_date == date_to_value and item.id != employee_permission.id: + if permission_date == date_to_value: raise exceptions.Warning( _('Sorry You Have Used All Your Permission In This Day you have one permission per a Day')) else: @@ -392,7 +371,7 @@ class HrPersonalPermission(models.Model): # @api.constrains('date_from', 'date_to') def send(self): - self._get_date_constrains() + #self._get_date_constrains() self.permission_number_decrement() self._get_date_constrains2() self.state = "send" diff --git a/odex25_hr/employee_requests/report/report_employee_identification.py b/odex25_hr/employee_requests/report/report_employee_identification.py index d79a8a88e..2bbe7b668 100644 --- a/odex25_hr/employee_requests/report/report_employee_identification.py +++ b/odex25_hr/employee_requests/report/report_employee_identification.py @@ -9,9 +9,9 @@ class EmployeeVacation(models.AbstractModel): @api.model def _get_report_values(self, docids, data): docs = self.env['employee.other.request'].browse(docids) - for record in docs: + '''for record in docs: if record.state != 'approved': - raise UserError(_("Sorry, you cannot print the report until final approval of the request")) + raise UserError(_("Sorry, you cannot print the report until final approval of the request"))''' docargs = { 'doc_ids': [], 'doc_model': ['employee.other.request'], diff --git a/odex25_hr/employee_requests/report/report_employee_identification1.py b/odex25_hr/employee_requests/report/report_employee_identification1.py index 754130cbe..7963071b5 100644 --- a/odex25_hr/employee_requests/report/report_employee_identification1.py +++ b/odex25_hr/employee_requests/report/report_employee_identification1.py @@ -9,9 +9,9 @@ class EmployeeVacation(models.AbstractModel): @api.model def _get_report_values(self, docids, data): docs = self.env['employee.other.request'].browse(docids) - for record in docs: + '''for record in docs: if record.state != 'approved': - raise UserError(_("Sorry, you cannot print the report until final approval of the request")) + raise UserError(_("Sorry, you cannot print the report until final approval of the request"))''' docargs = { 'doc_ids': [], 'doc_model': ['employee.other.request'], diff --git a/odex25_hr/employee_requests/report/report_employee_identification2.py b/odex25_hr/employee_requests/report/report_employee_identification2.py index 874e33ca8..1c17efe99 100644 --- a/odex25_hr/employee_requests/report/report_employee_identification2.py +++ b/odex25_hr/employee_requests/report/report_employee_identification2.py @@ -9,9 +9,9 @@ class EmployeeVacation(models.AbstractModel): @api.model def _get_report_values(self, docids, data): docs = self.env['employee.other.request'].browse(docids) - for record in docs: + '''for record in docs: if record.state != 'approved': - raise UserError(_("Sorry, you cannot print the report until final approval of the request")) + raise UserError(_("Sorry, you cannot print the report until final approval of the request"))''' docargs = { 'doc_ids': [], 'doc_model': ['employee.other.request'], diff --git a/odex25_hr/employee_requests/report/report_employee_identify.xml b/odex25_hr/employee_requests/report/report_employee_identify.xml index b1c164325..36e521356 100644 --- a/odex25_hr/employee_requests/report/report_employee_identify.xml +++ b/odex25_hr/employee_requests/report/report_employee_identify.xml @@ -20,46 +20,41 @@ url("/employee_requests/static/fonts/ce7b5754581057e6f7444e2192850cc8.ttf") format("truetype"); } #content-table thead tr th{ - background-color: rgb(77, 168, 178); + background-color: rgb(20,166,156); border: 1px solid #222; vertical-align: middle; font-weight: bold; text-align:center; color: #fff; - padding: 10px 0; - font-size: 14pt; - - + padding: 8px 0; + font-size: 13pt; } #content-table td{ font-family: 'Sakkal Majalla'!important; } - #content-table thead tr th{ - width: 50%; - font-family: 'Sakkal Majalla'!important; - } #content-table tbody tr td{ border: 1px solid; vertical-align: middle; - padding: 10px 0; + padding: 8px 0; text-align: center; - font-size:14pt; + font-size:13pt; } #content-table tbody tr td:last-child{ direction: ltr; background-color: rgb(230, 230, 231); color: #222; font-weight: bold; - width: 25%; + width: 32%; } #content-table tbody tr td:first-child{ direction: rtl; background-color: rgb(230, 230, 231); color: #222; font-weight: bold; - width: 25%; + width: 32%; } +

شهادة تعريف @@ -67,23 +62,25 @@ Employment Certificate

- + +
- -
-

+

+

مقدم إلى:

نفيدكم بأن الموظف الموضح هويته أدناه يعمل لدى - - + - + ولا يزال على رأس العمل حتى تاريخه و أعطيت له هذه الشهادة بناء على طلبه دون أدنى مسئولية.
-

+

+

Addressed To: -

This is to certify that Below-mentioned employee is working in @@ -91,166 +88,124 @@ - This certification - is issued - upon the request of the employee without any obligation + is issued upon the request of the employee without any obligation
+
+
+ -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
تعريف عملCertificate of Employment
التاريخ - - Date
رقم الموظف - - Emp No.
اسم الموظف - - - - Name
الوظيفة الحالية - - Position
رقم الهوية - - ID No.
الجنسية - - Nationality
الراتب الأساسي - - ريال - Basic Salary
بدل السكن - - ريال - Housing Allowance
بدل النقل - - ريال - Transportation Allowance
الراتب الشهري الإجمالي - - ريال - Total Salary / month
تاريخ التعيين - - Hire Date
-
-
-
- - - - - - - - - - -

- مدير إدارة الموارد البشرية -
- Director of Human Resource -
- - -

- - - - - - - - - - - - - - - - - - - - - - - + + + تعريف عمل + Certificate of Employment + + + + + التاريخ + + + + Date + + + رقم الموظف + + + + Emp No. + + + اسم الموظف + + + + + + + Name + + + الوظيفة الحالية + + + + Position + + + رقم الهوية + + + + ID No. + + + الجنسية + + + + Nationality + + + الراتب الأساسي + + + ريال + + Basic Salary + + + بدل السكن + + + ريال + + Housing Allowance + + + بدل النقل + + + ريال + + Transportation Allowance + + + الراتب الشهري الإجمالي + + + ريال + + Total Salary / month + + + تاريخ التعيين + + + + Hire Date + + + + + +
+
+
+

+ مدير إدارة الموارد البشرية +
+ Director of Human Resource +
+ +

+ diff --git a/odex25_hr/employee_requests/report/report_employee_identify_2.xml b/odex25_hr/employee_requests/report/report_employee_identify_2.xml index 9fe6bdf90..cfd86ec0a 100644 --- a/odex25_hr/employee_requests/report/report_employee_identify_2.xml +++ b/odex25_hr/employee_requests/report/report_employee_identify_2.xml @@ -19,7 +19,7 @@ url("/employee_requests/static/fonts/ce7b5754581057e6f7444e2192850cc8.ttf") format("truetype"); } #content-table thead tr th{ - background-color: rgb(77, 168, 178); + background-color: rgb(20,166,156); border: 1px solid #222; vertical-align: middle; font-weight: bold; @@ -38,7 +38,7 @@ #content-table tbody tr td{ border: 1px solid; vertical-align: middle; - padding: 10px 0; + padding: 9px 0; text-align: center; font-size:14pt; } @@ -65,41 +65,43 @@ Employment Certificate - +
- -
-

+

+

مقدم إلى:

نفيدكم بأن الموظف الموضح هويته أدناه يعمل لدى - - + - + ولا يزال على رأس العمل حتى تاريخه و أعطيت له هذه الشهادة بناء على طلبه دون أدنى مسئولية.
-

+

+

Addressed To: -

This is to certify that Below-mentioned employee is working in - - This certification - is issued - upon the request of the employee without any obligation + This certification is issued upon the request of the employee without any + obligation +
-
- +
@@ -108,72 +110,65 @@ - + - + - - + - + - + - + - - + - + - - + - + - - + - + - - + - + - - + - + -
تعريف عمل
التاريخالتاريخ DateDate
رقم الموظفرقم الموظف Emp No.Emp No.
اسم الموظفاسم الموظف NameName
الوظيفة الحاليةالوظيفة الحالية PositionPosition
رقم الهويةرقم الهوية ID No.ID No.
الجنسيةالجنسية NationalityNationality
تاريخ التعيينتاريخ التعيين Hire DateHire Date
الراتب الشهري الإجماليالراتب الشهري الإجمالي ريال Total Salary / monthTotal Salary / month
@@ -182,22 +177,23 @@


- - - - - - - - - - -

+
+ + + + + + + + + + +

مدير إدارة الموارد البشرية
Director of Human Resource
- +

diff --git a/odex25_hr/employee_requests/report/report_employee_identify_3.xml b/odex25_hr/employee_requests/report/report_employee_identify_3.xml index 2cd9c5e09..6d86b66f6 100644 --- a/odex25_hr/employee_requests/report/report_employee_identify_3.xml +++ b/odex25_hr/employee_requests/report/report_employee_identify_3.xml @@ -19,7 +19,7 @@ url("/employee_requests/static/fonts/ce7b5754581057e6f7444e2192850cc8.ttf") format("truetype"); } #content-table thead tr th{ - background-color: rgb(77, 168, 178); + background-color: rgb(20,166,156); border: 1px solid #222; vertical-align: middle; font-weight: bold; @@ -66,11 +66,11 @@ Employment Certificate
- +
- -
-

+

+

مقدم إلى:

@@ -80,31 +80,29 @@ ولا يزال على رأس العمل حتى تاريخه و أعطيت له هذه الشهادة بناء على طلبه دون أدنى مسئولية.
-

+

+

Addressed To: -

This is to certify that Below-mentioned employee is working in - - This certification - is issued - upon the request of the employee without any obligation + This certification is issued upon the request of the employee without any + obligation +

-
+ class="Table Rtl TableWordWrap SCXW182515882 BCX2" + style="margin-right:10%; font-size: 8pt; width: 90%;"> @@ -113,64 +111,58 @@ - + - + - - + - + - + - + - - + - + - - + - + - - + - + - - + - + -
تعريف عمل
التاريخالتاريخ DateDate
رقم الموظفرقم الموظف Emp No.Emp No.
اسم الموظفاسم الموظف NameName
الوظيفة الحاليةالوظيفة الحالية PositionPosition
رقم الهويةرقم الهوية ID No.ID No.
الجنسيةالجنسية NationalityNationality
تاريخ التعيينتاريخ التعيين Hire DateHire Date
@@ -180,22 +172,23 @@


- - - - - - - - - - -

+
+ + + + + + + + + + +

مدير إدارة الموارد البشرية
Director of Human Resource
- +