From 753c72cb2fd2786b7f126ba0e2e185f1c18e6df0 Mon Sep 17 00:00:00 2001
From: blackbelts <74664702+eslamtalaat74@users.noreply.github.com>
Date: Tue, 29 Jul 2025 17:43:30 +0300
Subject: [PATCH] empowerment_management menues
---
.../i18n/ar_001.po | 22 +++
.../models/empowerment_management.py | 12 +-
.../models/service_settings.py | 49 +++---
.../security/ir.model.access.csv | 3 +
.../views/empowerment_management.xml | 100 ++++++------
.../views/service_settings.xml | 142 +++++++++++++++---
6 files changed, 222 insertions(+), 106 deletions(-)
diff --git a/odex25_ensan/odex25_empowermentmanagement/i18n/ar_001.po b/odex25_ensan/odex25_empowermentmanagement/i18n/ar_001.po
index 4580c15b6..5764bd7ac 100644
--- a/odex25_ensan/odex25_empowermentmanagement/i18n/ar_001.po
+++ b/odex25_ensan/odex25_empowermentmanagement/i18n/ar_001.po
@@ -27,6 +27,28 @@ msgstr "المؤهلات العلمية"
msgid "Qualification Specification"
msgstr "تخصص المؤهل"
+#. module: odex25_empowermentmanagement
+#: model:ir.model.fields,field_description:odex25_empowermentmanagement.field_qualification_specification_req__name
+msgid "Name"
+msgstr "الاسم"
+
+#. module: odex25_empowermentmanagement
+#: model:ir.model.fields,field_description:odex25_empowermentmanagement.field_qualification_specification_req__type
+msgid "Type"
+msgstr "النوع"
+
+
+
+#. module: odex25_empowermentmanagement
+#: model:ir.model.fields.selection,name:odex25_empowermentmanagement.selection__empowerment_qualification_specification_req__type__qualification
+msgid "Qualification"
+msgstr "مؤهل"
+
+#. module: odex25_empowermentmanagement
+#: model:ir.model.fields.selection,name:odex25_empowermentmanagement.selection__qualification_specification_req__type__certificate
+msgid "Certificate"
+msgstr "شهادة"
+
#. module: odex25_empowermentmanagement
#: model:ir.model,name:odex25_empowermentmanagement.model_hr_qualification_name_req
msgid "HR Qualification Name"
diff --git a/odex25_ensan/odex25_empowermentmanagement/models/empowerment_management.py b/odex25_ensan/odex25_empowermentmanagement/models/empowerment_management.py
index fb4ab3ebe..aed2b1ca5 100644
--- a/odex25_ensan/odex25_empowermentmanagement/models/empowerment_management.py
+++ b/odex25_ensan/odex25_empowermentmanagement/models/empowerment_management.py
@@ -67,8 +67,8 @@ class EmpowermentRequest(models.Model):
# create model
- # training_course_id = fields.Many2one('training.course', string='دورة التأهيل')
- # training_entity_id = fields.Many2one('training.entity', string='جهة التدريب')
+ training_course_id = fields.Many2one('empowerment.qualification.course', string='دورة التأهيل')
+ training_entity_id = fields.Many2one('empowerment.training.entity', string='جهة التدريب')
training_intercession_type = fields.Selection([
('new_acceptance', 'قبول جديد'),
@@ -79,11 +79,12 @@ class EmpowermentRequest(models.Model):
], string="نوع شفاعة التدريب")
# تمويل
- # project_funding_type_id = fields.Many2one('project.funding.type', string='نوع تمويل المشروع')
+ project_funding_type_id = fields.Many2one('project.funding.type', string='نوع تمويل المشروع')
sponsor_id = fields.Many2one('takaful.sponsor', string='اسم الكافل')
sponsor_mobile = fields.Char(related='sponsor_id.mobile', readonly=True)
+ # sponsor_id.id_number
# commint
- # sponsor_identity = fields.Char(related='sponsor_id.identity_number', readonly=True)
+ sponsor_identity = fields.Char(related='sponsor_id.id_number', readonly=True)
sponsor_email = fields.Char(related='sponsor_id.email', readonly=True)
# sponsor_communication_method = fields.Selection(related='sponsor_id.communication_method', readonly=True)
@@ -92,8 +93,9 @@ class EmpowermentRequest(models.Model):
# جهة الاستلام
request_receiver_id = fields.Many2one('res.partner', string='الشخص المرسل اليه الطلب',
+ domain="[('is_empowerment_receiver', '=', True)]"
)
- # domain="[('is_empowerment_receiver', '=', True)]"
+
description = fields.Text(string='الشرح', )
diff --git a/odex25_ensan/odex25_empowermentmanagement/models/service_settings.py b/odex25_ensan/odex25_empowermentmanagement/models/service_settings.py
index e23496348..253059a1b 100644
--- a/odex25_ensan/odex25_empowermentmanagement/models/service_settings.py
+++ b/odex25_ensan/odex25_empowermentmanagement/models/service_settings.py
@@ -87,24 +87,7 @@ class HrDepartment(models.Model):
)
-# class EmpowermentEducationEntity(models.Model):
-# _name = 'empowerment.education.entity'
-# _description = 'الجهات التعليمية'
-#
-# name = fields.Char(string='اسم الجهة', required=True)
-# entity_type = fields.Selection(
-# [('university', 'جامعة'), ('college', 'كلية'),
-# ('institute', 'معهد'), ('school', 'مدرسة')],
-# string='نوع الجهة', required=True
-# )
-# study_specialization = fields.Selection(
-# [('bachelor', 'بكالريوس'), ('diploma', 'دبلوم')],
-# string='تخصص الدراسة', required=True
-# )
-# specialization_id = fields.Many2one(
-# 'empowerment.study.specialization', string='تخصص الدراسة',
-# domain="[('type', '=', study_specialization)]",
-# )
+
class EmpowermentEducationEntity(models.Model):
_name = 'empowerment.education.entity'
@@ -141,17 +124,7 @@ class EmpowermentEducationEntity(models.Model):
# Reset specialization_id when entity_type changes
# self.specialization_id = False
-# class StudySpecialization(models.Model):
-# _name = 'empowerment.study.specialization'
-# _description = 'تخصص الدراسة'
-#
-# type = fields.Selection([
-# ('bachelor', 'بكالريوس'),
-# ('diploma', 'دبلوم')
-# ], string='تخصص الدراسة', required=True)
-#
-# universities_colleges = fields.Char(string='الجامعات / الكليات')
-# institutes_schools = fields.Char(string='اسم المعهد / المدرسة')
+
class StudySpecialization(models.Model):
_name = 'empowerment.study.specialization'
@@ -165,3 +138,21 @@ class StudySpecialization(models.Model):
universities_colleges = fields.Char(string='Universities / Colleges')
institutes_schools = fields.Char(string='Institute / School Name')
+class EmpowermentQualificationCourse(models.Model):
+ _name = 'empowerment.qualification.course'
+ _description = 'Qualification Course'
+
+ name = fields.Char(string='اسم الجهة', required=True)
+
+class EmpowermentTrainingEntity(models.Model):
+ _name = 'empowerment.training.entity'
+ _description = 'جهات التدريب'
+
+ name = fields.Char(string='اسم الجهة', required=True)
+
+class EmpowermentProjectFundingType(models.Model):
+ _name = 'empowerment.project.funding.type'
+ _description = 'نوع تمويل المشاريع'
+
+ name = fields.Char(string='اسم الجهة', required=True)
+
diff --git a/odex25_ensan/odex25_empowermentmanagement/security/ir.model.access.csv b/odex25_ensan/odex25_empowermentmanagement/security/ir.model.access.csv
index c9b33dfd2..21de33de5 100644
--- a/odex25_ensan/odex25_empowermentmanagement/security/ir.model.access.csv
+++ b/odex25_ensan/odex25_empowermentmanagement/security/ir.model.access.csv
@@ -8,3 +8,6 @@ access_hr_qualification_name_req,access_hr_qualification_name_req,model_hr_quali
access_hr_employee_history_req,access_hr_employee_history_req,model_hr_employee_history_req,,1,1,1,1
access_qualification_specification_req,access_qualification_specification_req,model_qualification_specification_req,,1,1,1,1
access_hr_qualification_req,access_hr_qualification_req,model_hr_qualification_req,,1,1,1,1
+access_empowerment_qualification_cours,access_empowerment_qualification_cours,model_empowerment_qualification_course,,1,1,1,1
+access_empowerment_training_entity,access_empowerment_training_entity,model_empowerment_training_entity,,1,1,1,1
+access_empowerment_project_funding_type,access_empowerment_project_funding_type,model_empowerment_project_funding_type,,1,1,1,1
diff --git a/odex25_ensan/odex25_empowermentmanagement/views/empowerment_management.xml b/odex25_ensan/odex25_empowermentmanagement/views/empowerment_management.xml
index 161dca138..a074be18f 100644
--- a/odex25_ensan/odex25_empowermentmanagement/views/empowerment_management.xml
+++ b/odex25_ensan/odex25_empowermentmanagement/views/empowerment_management.xml
@@ -62,9 +62,9 @@
'bachelor_intercession','diploma_intercession'])]}">
+ />
+ />
@@ -75,17 +75,17 @@
-
-
+
+
-
+
-
+
@@ -111,22 +111,22 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
@@ -154,7 +154,7 @@
+ />
@@ -333,23 +333,23 @@
- empowerment.request.search
- empowerment.request
-
-
-
-
-
-
-
+ empowerment.request.search
+ empowerment.request
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -362,22 +362,22 @@
- empowerment.return.reason.wizard.form
- empowerment.return.reason.wizard
-
-
-
-
+ empowerment.return.reason.wizard.form
+ empowerment.return.reason.wizard
+
+
+
+
diff --git a/odex25_ensan/odex25_empowermentmanagement/views/service_settings.xml b/odex25_ensan/odex25_empowermentmanagement/views/service_settings.xml
index c3da7d079..830dde068 100644
--- a/odex25_ensan/odex25_empowermentmanagement/views/service_settings.xml
+++ b/odex25_ensan/odex25_empowermentmanagement/views/service_settings.xml
@@ -8,9 +8,9 @@
-
-
-
+
+
+
@@ -57,7 +57,7 @@
-
+
@@ -70,24 +70,24 @@
- empowerment.study.specialization.form
- empowerment.study.specialization
-
-
-
-
+ empowerment.study.specialization.form
+ empowerment.study.specialization
+
+
+
+
تخصص الدراسة
@@ -96,6 +96,101 @@
+
+ empowerment.qualification.course.tree
+ empowerment.qualification.course
+
+
+
+
+
+
+
+
+
+ empowerment.qualification.course.form
+ empowerment.qualification.course
+
+
+
+
+
+
+
+ دورات التأهيل
+ empowerment.qualification.course
+ tree,form
+
+
+
+
+ empowerment.training.entity.tree
+ empowerment.training.entity
+
+
+
+
+
+
+
+
+ empowerment.training.entity.form
+ empowerment.training.entity
+
+
+
+
+
+
+ جهات التدريب
+ empowerment.training.entity
+ tree,form
+
+
+
+ empowerment.project.funding.type.tree
+ empowerment.project.funding.type
+
+
+
+
+
+
+
+
+ empowerment.project.funding.type.form
+ empowerment.project.funding.type
+
+
+
+
+
+
+ أنواع تمويل المشاريع
+ empowerment.project.funding.type
+ tree,form
+
+
+
+
@@ -108,5 +203,8 @@
+
+
+