Merge branch 'dev_odex25_ensan' into tt_dev_odex25_ensan
This commit is contained in:
commit
fb9f88e81f
|
|
@ -42,7 +42,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -71,7 +70,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -100,7 +98,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -130,7 +127,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -159,7 +155,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -188,7 +183,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -216,7 +210,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
@ -245,7 +238,6 @@ jobs:
|
|||
github.actor == 'expsa' ||
|
||||
github.actor == 'ahmadaking' ||
|
||||
github.actor == 'ronozoro' ||
|
||||
github.actor == 'SamirLADOUI-sa' ||
|
||||
github.actor == 'Abubaker-Altaib' ||
|
||||
github.actor == 'abdurrahman-saber' ||
|
||||
github.actor == 'altexp' ||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
# odex25-standard-modules
|
||||
This Repo contains general standard modules for all projects.
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
'views/family_members.xml',
|
||||
'views/family_complaints.xml',
|
||||
'views/education_status_views.xml',
|
||||
'views/education_period.xml',
|
||||
'views/seasonal_service_view.xml',
|
||||
|
||||
'wizards/researcher_wizard.xml',
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
'wizards/visit_location_refused_wizard_view.xml',
|
||||
'views/visit_survey.xml',
|
||||
'views/actions_and_menus.xml',
|
||||
],
|
||||
],
|
||||
'external_dependencies': {
|
||||
'python': ['num2words'],
|
||||
},
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
from odoo import http
|
||||
from odoo import http, _
|
||||
from odoo.http import request
|
||||
from odoo.addons.phone_validation.tools import phone_validation
|
||||
|
||||
|
|
@ -32,9 +32,19 @@ class CreatePortalAccount(http.Controller):
|
|||
# Check if user already exists with the same otp_mobile_phone
|
||||
existing_user = request.env['res.users'].sudo().search([('login', '=', login)], limit=1)
|
||||
if existing_user:
|
||||
existing_partner = existing_user.partner_id
|
||||
is_family_or_beneficiary = existing_partner.is_family or existing_partner.is_benefit
|
||||
is_donor_vendor_sponsor = existing_partner.is_donor or existing_partner.is_sponsor_portal or existing_partner.is_vendor
|
||||
|
||||
if is_family_or_beneficiary and account_type == 'donor':
|
||||
message = _("This phone number is already registered as Family/Beneficiary and cannot be used for sponsor account!")
|
||||
elif is_donor_vendor_sponsor and account_type == 'family':
|
||||
message = _("This phone number is already registered as Donor/Sponsor and cannot be used for family account!")
|
||||
else:
|
||||
message = _('This phone number is already registered. Please use a different phone number.')
|
||||
data = {
|
||||
'status': False,
|
||||
'message': 'This phone number is already registered. Please use a different phone number.'
|
||||
'message': message
|
||||
}
|
||||
return json.dumps(data)
|
||||
|
||||
|
|
@ -52,9 +62,12 @@ class CreatePortalAccount(http.Controller):
|
|||
'name': f'{first_name} {second_name}',
|
||||
'email': email,
|
||||
'phone': formatted_phone,
|
||||
# 'account_type': account_type,
|
||||
}
|
||||
partner = Partner.create(partner_vals)
|
||||
partner = Partner.search([('phone', '=like', f'%{formatted_phone}')], limit=1)
|
||||
if not partner:
|
||||
partner = Partner.create(partner_vals)
|
||||
else:
|
||||
partner.write(partner_vals)
|
||||
|
||||
# Create user and link to partner (no reset password)
|
||||
Users = request.env['res.users'].sudo()
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -21,6 +21,8 @@ from . import family_validation_setting
|
|||
from . import expenses_type
|
||||
from . import changes_requests
|
||||
from . import education_settings
|
||||
from . import education_period
|
||||
from . import family_member_exam
|
||||
from . import hr_department
|
||||
from . import account_move_line
|
||||
from . import family_expense
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -757,7 +757,7 @@ class AttachmentsSettings(models.Model):
|
|||
disabilities_id = fields.Many2one('disabilities.settings',string='Disabilities')
|
||||
attach_type = fields.Selection(
|
||||
[('family_attach', _('Family Attach')), ('member_attach', _('Member Attach')), ('hobbies_attach', _('Hobbies Attach')),
|
||||
('diseases_attach', _('Diseases Attach')), ('disabilities_attach', _('Disabilities Attach')), ('income_attach', _('Income Attach'))])
|
||||
('diseases_attach', _('Diseases Attach')), ('disabilities_attach', _('Disabilities Attach')), ('income_attach', _('Income Attach')), ('exams_attach', _('Exams Attach'))])
|
||||
is_required = fields.Boolean(string='Is Required?')
|
||||
is_default = fields.Boolean(string='Is Default?')
|
||||
show_in_portal = fields.Boolean(default=True)
|
||||
|
|
@ -772,6 +772,13 @@ class EducationIlliterateReason(models.Model):
|
|||
|
||||
name = fields.Char(string='name')
|
||||
|
||||
|
||||
class EducationDelayReason(models.Model):
|
||||
_name = 'education.delay.reason'
|
||||
_description = "Education Delay Reason"
|
||||
|
||||
name = fields.Char(string='name', required=True)
|
||||
|
||||
class IncomeType(models.Model):
|
||||
_name = 'income.type'
|
||||
_description = "Income Type"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
from odoo import fields, models,api
|
||||
|
||||
|
||||
class EducationPeriod(models.Model):
|
||||
_name = 'education.period'
|
||||
_description = 'Education Period'
|
||||
_order = 'id desc'
|
||||
|
||||
name = fields.Char(string="Name", required=True)
|
||||
start_date = fields.Date(string='Period Start Date', required=True)
|
||||
end_date = fields.Date(string='Period End Date', required=True)
|
||||
education_level_ids = fields.Many2many('education.level', string='Education Levels')
|
||||
education_entity_ids = fields.Many2many("education.entities", string='Education Entities')
|
||||
|
|
@ -5,21 +5,31 @@ class EducationEntities(models.Model):
|
|||
_name = 'education.entities'
|
||||
|
||||
name = fields.Char(string='Name')
|
||||
education_level_id = fields.Many2one('education.level', string='Education Level')
|
||||
|
||||
|
||||
class EducationLevel(models.Model):
|
||||
_name = 'education.level'
|
||||
|
||||
name = fields.Char(string='Name')
|
||||
level_expected_age = fields.Float(string="Level Expected Age")
|
||||
|
||||
class EducationClassroom(models.Model):
|
||||
_name = 'education.classroom'
|
||||
|
||||
name = fields.Char(string='Name')
|
||||
education_level_id = fields.Many2one('education.level', string='Education Level')
|
||||
|
||||
class EducationResults(models.Model):
|
||||
_name = 'education.result'
|
||||
|
||||
name = fields.Char(string='Name',compute="get_name")
|
||||
evaluation = fields.Char(string='Evaluation')
|
||||
rate_type = fields.Selection([
|
||||
('from_4', 'From 4'),
|
||||
('from_5', 'From 5'),
|
||||
('from_100', 'From 100'),
|
||||
], string='Rate Type')
|
||||
min_degree = fields.Float(string='Mini Degree')
|
||||
max_degree = fields.Float(string='Max Degree')
|
||||
|
||||
|
|
@ -30,7 +40,14 @@ class EducationResults(models.Model):
|
|||
rec.name = rec.evaluation + " " + str(rec.min_degree) + "-" + str(rec.max_degree)
|
||||
else:
|
||||
rec.name=""
|
||||
|
||||
class StudyMaterial(models.Model):
|
||||
_name = 'study.material'
|
||||
|
||||
name = fields.Char(string='Name')
|
||||
|
||||
|
||||
class EducationExamType(models.Model):
|
||||
_name = 'education.exam.type'
|
||||
|
||||
name = fields.Char(string='Name', required=True)
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
from odoo import models, fields, api, _
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||
from dateutil.relativedelta import relativedelta as rd
|
||||
from datetime import datetime, date
|
||||
|
||||
|
||||
class EducationStatus(models.Model):
|
||||
|
|
@ -11,24 +14,24 @@ class EducationStatus(models.Model):
|
|||
|
||||
name = fields.Char(
|
||||
string="Sequence",
|
||||
default="/",
|
||||
readonly=True,
|
||||
copy=False,
|
||||
default="/",
|
||||
readonly=True,
|
||||
copy=False,
|
||||
index=True
|
||||
)
|
||||
|
||||
|
||||
education_status_type = fields.Selection(
|
||||
selection=[
|
||||
('current', 'Current'),
|
||||
('previous', 'Previous')
|
||||
],
|
||||
required=True
|
||||
required=False, compute="_compute_education_status_type", store=True
|
||||
)
|
||||
education_status = fields.Selection(
|
||||
string='Education Status',
|
||||
selection=[
|
||||
('educated', 'Educated'),
|
||||
('illiterate', 'Illiterate'),
|
||||
('educated', 'Educated'),
|
||||
('illiterate', 'Illiterate'),
|
||||
('under_study_age', 'Under Study Age')
|
||||
],
|
||||
compute="_compute_education_status",
|
||||
|
|
@ -36,8 +39,8 @@ class EducationStatus(models.Model):
|
|||
)
|
||||
case_study = fields.Selection(
|
||||
string='Case Study',
|
||||
selection=[('continuous', 'Continuous'),
|
||||
('intermittent', 'Intermittent'),
|
||||
selection=[('continuous', 'Continuous'),
|
||||
('intermittent', 'Intermittent'),
|
||||
('graduate', 'Graduate')]
|
||||
)
|
||||
education_entity = fields.Selection(
|
||||
|
|
@ -47,7 +50,7 @@ class EducationStatus(models.Model):
|
|||
)
|
||||
education_start_date = fields.Date(string='Education Start Date')
|
||||
education_end_date = fields.Date(string='Education End Date')
|
||||
|
||||
|
||||
educational_certificate = fields.Many2many(
|
||||
'ir.attachment',
|
||||
'rel_education_status_educational_certificate_attachment',
|
||||
|
|
@ -55,52 +58,105 @@ class EducationStatus(models.Model):
|
|||
'attachment_id',
|
||||
string='Educational Certificate'
|
||||
)
|
||||
|
||||
entities = fields.Many2one("education.entities", string='Entity')
|
||||
education_levels = fields.Many2one("education.level", string='Education Levels')
|
||||
classroom = fields.Many2one('education.classroom', string='Classroom')
|
||||
entities = fields.Many2one("education.entities", string='Entity',
|
||||
domain="[('education_level_id', '=', education_levels)]")
|
||||
education_period_id = fields.Many2one("education.period", string='Education Period', domain="['|', '|', ('education_level_ids', 'in', education_levels), ('education_level_ids', '=', False),'|',('education_entity_ids', 'in', entities), ('education_entity_ids', '=', False)]")
|
||||
classroom = fields.Many2one('education.classroom', string='Classroom',
|
||||
domain="[('education_level_id', '=', education_levels)]")
|
||||
rate_type = fields.Selection([
|
||||
('from_4', 'From 4'),
|
||||
('from_5', 'From 5'),
|
||||
('from_100', 'From 100'),
|
||||
], string='Rate Type')
|
||||
degree = fields.Many2one('education.result', string='Degree')
|
||||
percentage = fields.Float(string="Percentage%")
|
||||
specialization_ids = fields.Many2one('specialization.specialization', string='Specialization')
|
||||
|
||||
intermittent_reason_id = fields.Many2one('education.illiterate.reason', string='Intermittent Reason')
|
||||
intermittent_date = fields.Date(string='Intermittent Date')
|
||||
family_member_age = fields.Integer(string="Age At Level Beginning", compute='_compute_family_member_age',
|
||||
store=True)
|
||||
family_member_delay = fields.Boolean(string="Member Delay", compute='_compute_family_member_delay', store=True)
|
||||
delay_reason_id = fields.Many2one('education.delay.reason', string='Delay Reason')
|
||||
weak_course_ids = fields.One2many('weak.course', 'education_status_id')
|
||||
|
||||
|
||||
@api.depends(
|
||||
'mother_grant_benefit_id',
|
||||
'mother_grant_benefit_id.education_status',
|
||||
'replacement_grant_benefit_id',
|
||||
'replacement_grant_benefit_id.replacement_education_status',
|
||||
'mother_grant_benefit_id',
|
||||
'mother_grant_benefit_id.education_status',
|
||||
'replacement_grant_benefit_id',
|
||||
'replacement_grant_benefit_id.replacement_education_status',
|
||||
'family_member_id',
|
||||
'family_member_id.education_status',
|
||||
)
|
||||
def _compute_education_status(self):
|
||||
for record in self:
|
||||
record.education_status = record.mother_grant_benefit_id.education_status or\
|
||||
record.replacement_grant_benefit_id.replacement_education_status or\
|
||||
record.family_member_id.education_status
|
||||
|
||||
record.education_status = record.mother_grant_benefit_id.education_status or \
|
||||
record.replacement_grant_benefit_id.replacement_education_status or \
|
||||
record.family_member_id.education_status
|
||||
|
||||
@api.depends("case_study")
|
||||
def _compute_education_status_type(self):
|
||||
for rec in self:
|
||||
if rec.case_study:
|
||||
if rec.case_study == "continuous":
|
||||
rec.education_status_type = "current"
|
||||
else:
|
||||
rec.education_status_type = "previous"
|
||||
else:
|
||||
rec.education_status_type = False
|
||||
|
||||
@api.depends("education_start_date", "family_member_id", "family_member_id.birth_date")
|
||||
def _compute_family_member_age(self):
|
||||
for rec in self:
|
||||
if rec.education_start_date and rec.family_member_id and rec.family_member_id.birth_date:
|
||||
day = datetime.strptime(str(rec.family_member_id.birth_date), DEFAULT_SERVER_DATE_FORMAT)
|
||||
age = rd(rec.education_start_date, day)
|
||||
rec.family_member_age = age.years
|
||||
else:
|
||||
rec.family_member_age = 0
|
||||
|
||||
@api.depends("family_member_age", "education_levels", "education_levels.level_expected_age")
|
||||
def _compute_family_member_delay(self):
|
||||
for rec in self:
|
||||
if rec.family_member_age > 0 and rec.education_levels and rec.education_levels.level_expected_age > 0:
|
||||
if rec.family_member_age > rec.education_levels.level_expected_age:
|
||||
rec.family_member_delay = True
|
||||
else:
|
||||
rec.family_member_delay = False
|
||||
else:
|
||||
rec.family_member_delay = False
|
||||
|
||||
@api.onchange('education_status_type')
|
||||
def _onchange_education_status_type(self):
|
||||
relation_id = self.mother_grant_benefit_id or\
|
||||
self.replacement_grant_benefit_id or\
|
||||
self.family_member_id
|
||||
relation_id = self.mother_grant_benefit_id or \
|
||||
self.replacement_grant_benefit_id or \
|
||||
self.family_member_id
|
||||
if self.education_status_type == 'current' and relation_id:
|
||||
existing_current = self.search([
|
||||
('education_status_type', '=', 'current'),
|
||||
'|', '|',
|
||||
('mother_grant_benefit_id', '=', relation_id._origin.id),
|
||||
('replacement_grant_benefit_id', '=', relation_id._origin.id),
|
||||
('family_member_id', '=', relation_id._origin.id)
|
||||
('mother_grant_benefit_id', '=', relation_id._origin.id),
|
||||
('replacement_grant_benefit_id', '=', relation_id._origin.id),
|
||||
('family_member_id', '=', relation_id._origin.id)
|
||||
], limit=1)
|
||||
if existing_current:
|
||||
return {
|
||||
"warning": {
|
||||
'title': _('Current Education Status Already Exists'),
|
||||
'message': _("There is already an education status marked as Current.\nIf you save this, %s will be marked as Previous!") % existing_current.name
|
||||
'message': _(
|
||||
"There is already an education status marked as Current.\nIf you save this, %s will be marked as Previous!") % existing_current.name
|
||||
}
|
||||
}
|
||||
|
||||
@api.onchange('education_period_id', 'education_period_id.start_date', 'education_period_id.end_date')
|
||||
def _onchange_field_name(self):
|
||||
self.ensure_one()
|
||||
if self.education_period_id:
|
||||
if self.education_period_id.start_date:
|
||||
self.education_start_date = self.education_period_id.start_date
|
||||
if self.education_period_id.end_date:
|
||||
self.education_end_date = self.education_period_id.end_date
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
# Determine the prefix based on the related field
|
||||
|
|
@ -130,14 +186,16 @@ class EducationStatus(models.Model):
|
|||
vals['name'] = f"{prefix}{formatted_number}"
|
||||
|
||||
# Ensure only one 'current' education status exists
|
||||
relation_id = vals.get('mother_grant_benefit_id', vals.get('replacement_grant_benefit_id', vals.get('family_member_id', False)))
|
||||
if not self.env.context.get('skip_current_check') and vals.get('education_status_type') == 'current' and relation_id:
|
||||
relation_id = vals.get('mother_grant_benefit_id',
|
||||
vals.get('replacement_grant_benefit_id', vals.get('family_member_id', False)))
|
||||
if not self.env.context.get('skip_current_check') and vals.get(
|
||||
'education_status_type') == 'current' and relation_id:
|
||||
existing_current = self.search([
|
||||
('education_status_type', '=', 'current'),
|
||||
'|', '|',
|
||||
('mother_grant_benefit_id', '=', relation_id),
|
||||
('replacement_grant_benefit_id', '=', relation_id),
|
||||
('family_member_id', '=', relation_id)
|
||||
('mother_grant_benefit_id', '=', relation_id),
|
||||
('replacement_grant_benefit_id', '=', relation_id),
|
||||
('family_member_id', '=', relation_id)
|
||||
], limit=1)
|
||||
|
||||
if existing_current:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
from odoo import fields, models,api
|
||||
|
||||
|
||||
class FamilyMemberExam(models.Model):
|
||||
_name = 'family.member.exam'
|
||||
_description = 'Family Member Exam'
|
||||
_order = 'id desc'
|
||||
|
||||
member_id = fields.Many2one('family.member', string='Family Member')
|
||||
exam_id = fields.Many2one('education.exam.type', string='Exam Type', required=True)
|
||||
exam_degree = fields.Float(string='Exam Degree')
|
||||
exam_date = fields.Date(string='Exam Date')
|
||||
exam_attachment = fields.Binary(string='Exam Attachment', attachment=True)
|
||||
exam_attachment_file_name = fields.Char(required=False)
|
||||
|
|
@ -96,6 +96,7 @@ class FamilyMemberProfile(models.Model):
|
|||
hobbies_ids = fields.One2many("member.hobbies", 'member_id')
|
||||
diseases_ids = fields.One2many("member.diseases", 'member_id')
|
||||
disabilities_ids = fields.One2many("member.disabilities", 'member_id')
|
||||
exam_ids = fields.One2many("family.member.exam", 'member_id')
|
||||
is_scientific_specialty = fields.Boolean('Is Scientific Specialty?',
|
||||
related="specialization_ids.is_scientific_specialty")
|
||||
is_medical_specialty = fields.Boolean('Is Medical Specialty?', related="specialization_ids.is_medical_specialty")
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -106,6 +106,9 @@ access_changes_requests,access_changes_requests,model_changes_requests,,1,1,1,1
|
|||
access_entity_black_list_wizard,access_entity_black_list_wizard,model_entity_black_list_wizard,,1,1,1,1
|
||||
access_education_entities,access_education_entities,model_education_entities,,1,1,1,1
|
||||
access_education_level,access_education_level,model_education_level,,1,1,1,1
|
||||
access_education_period,access_education_period,model_education_period,,1,1,1,1
|
||||
access_education_exam_type,access_education_exam_type,model_education_exam_type,,1,1,1,1
|
||||
access_family_member_exam,access_family_member_exam,model_family_member_exam,,1,1,1,1
|
||||
access_education_classroom,access_education_classroom,model_education_classroom,,1,1,1,1
|
||||
access_education_result,access_education_result,model_education_result,,1,1,1,1
|
||||
access_study_material,access_study_material,model_study_material,,1,1,1,1
|
||||
|
|
@ -118,6 +121,7 @@ access_rent_lines,access_rent_lines,model_rent_lines,base.group_user,1,1,1,1
|
|||
access_relation_settings,access_relation_settings,model_relation_settings,,1,1,1,1
|
||||
access_attachments_settings,access_attachments_settings,model_attachments_settings,base.group_user,1,1,1,1
|
||||
access_education_illiterate_reason,access_education_illiterate_reason,model_education_illiterate_reason,base.group_user,1,1,1,1
|
||||
access_education_delay_reason,access_education_delay_reason,model_education_delay_reason,base.group_user,1,1,1,1
|
||||
access_income_type,access_income_type,model_income_type,base.group_user,1,1,1,1
|
||||
access_loan_giver,access_loan_giver,model_loan_giver,base.group_user,1,1,1,1
|
||||
access_loan_reason,access_loan_reason,model_loan_reason,base.group_user,1,1,1,1
|
||||
|
|
|
|||
|
|
|
@ -1016,16 +1016,25 @@
|
|||
parent="education_main_menu" action="education_entities_action" sequence="0"/>
|
||||
<menuitem id="education_level_menu" name="Education Level"
|
||||
parent="education_main_menu" action="education_level_action" sequence="1"/>
|
||||
<menuitem id="education_period_menu"
|
||||
name="Education Periods"
|
||||
parent="education_main_menu"
|
||||
action="education_period_action"
|
||||
sequence="2"/>
|
||||
<menuitem id="specialization_menu" name="Specialization"
|
||||
parent="education_main_menu" action="specialization_action" sequence="2"/>
|
||||
parent="education_main_menu" action="specialization_action" sequence="3"/>
|
||||
<menuitem id="education_classroom_menu" name="Education Classroom"
|
||||
parent="education_main_menu" action="education_classroom_action" sequence="3"/>
|
||||
parent="education_main_menu" action="education_classroom_action" sequence="4"/>
|
||||
<menuitem id="education_result_menu" name="Education Result"
|
||||
parent="education_main_menu" action="education_result_action" sequence="4"/>
|
||||
parent="education_main_menu" action="education_result_action" sequence="5"/>
|
||||
<menuitem id="study_material_menu" name="Study Material"
|
||||
parent="education_main_menu" action="study_material_action" sequence="5"/>
|
||||
parent="education_main_menu" action="study_material_action" sequence="6"/>
|
||||
<menuitem id="illiterate_reason_menu" name="Education Illiterate Reason"
|
||||
parent="education_main_menu" action="education_illiterate_reason_action" sequence="6"/>
|
||||
parent="education_main_menu" action="education_illiterate_reason_action" sequence="7"/>
|
||||
<menuitem id="delay_reason_menu" name="Education Delay Reason"
|
||||
parent="education_main_menu" action="education_delay_reason_action" sequence="8"/>
|
||||
<menuitem id="education_exam_type_menu" name="Exams Type"
|
||||
parent="education_main_menu" action="education_exam_type_action" sequence="9"/>
|
||||
<menuitem id="menu_confirm_benefit_expense" name="Benefit Expense Flow" parent="account.menu_finance_payables"
|
||||
action="action_confirm_benefit_expense" sequence="11"/>
|
||||
<menuitem id="menu_payment_orders" name="Payment Orders"
|
||||
|
|
|
|||
|
|
@ -1118,6 +1118,35 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Education Delay Reason View Form -->
|
||||
<record id="education_delay_reason_form" model="ir.ui.view">
|
||||
<field name="name">Education Delay Reason</field>
|
||||
<field name="model">education.delay.reason</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Education Delay Reason View Tree -->
|
||||
<record id="education_delay_reason_tree" model="ir.ui.view">
|
||||
<field name="name">Education Delay Reason</field>
|
||||
<field name="model">education.delay.reason</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Income Type Form and Tree -->
|
||||
<record id="income_type_form" model="ir.ui.view">
|
||||
<field name="name">Income Type</field>
|
||||
|
|
|
|||
|
|
@ -912,6 +912,20 @@
|
|||
attrs="{'invisible': [('education_status', '!=', 'educated')]}">
|
||||
<field name="member_education_status_ids" mode="tree,form"/>
|
||||
</page>
|
||||
<page string="Exams Degrees" attrs="{'invisible': [('education_status', '!=', 'educated')]}">
|
||||
<field name="exam_ids" mode="tree" options="{'no_open': True}"
|
||||
widget="one2many_list">
|
||||
<tree editable="bottom">
|
||||
<field name="member_id" invisible="1"/>
|
||||
<field name="exam_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="exam_degree"/>
|
||||
<field name="exam_date"/>
|
||||
<field name="exam_attachment" widget="binary" filename="exam_attachment_file_name"/>
|
||||
<field name="exam_attachment_file_name" invisible="1"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" widget="one2many_list" mode="tree"
|
||||
options="{'no_open': True}">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Form View -->
|
||||
<record id="education_period_view_form" model="ir.ui.view">
|
||||
<field name="name">education.period.view.form</field>
|
||||
<field name="model">education.period</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Education Periods">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="education_level_ids" widget="many2many_tags"
|
||||
options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="education_entity_ids" widget="many2many_tags"
|
||||
options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- List View -->
|
||||
<record id="education_period_view_list" model="ir.ui.view">
|
||||
<field name="name">education.period.view.list</field>
|
||||
<field name="model">education.period</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Education Periods">
|
||||
<field name="name"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="education_level_ids" widget="many2many_tags"
|
||||
options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="education_entity_ids" widget="many2many_tags"
|
||||
options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action -->
|
||||
<record id="education_period_action" model="ir.actions.act_window">
|
||||
<field name="name">Education Periods</field>
|
||||
<field name="res_model">education.period</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first education period!
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="education_level_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
@ -20,6 +21,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Education Entities">
|
||||
<field name="name"/>
|
||||
<field name="education_level_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -38,6 +40,7 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="level_expected_age"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
@ -49,6 +52,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Education Level">
|
||||
<field name="name"/>
|
||||
<field name="level_expected_age"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -67,6 +71,7 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="education_level_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
@ -78,6 +83,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Education Classroom">
|
||||
<field name="name"/>
|
||||
<field name="education_level_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -97,6 +103,7 @@
|
|||
<group>
|
||||
<field name="name"/>
|
||||
<field name="evaluation" required="1"/>
|
||||
<field name="rate_type" required="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="min_degree" required="1"/>
|
||||
|
|
@ -113,6 +120,7 @@
|
|||
<tree string="Education Result">
|
||||
<field name="name"/>
|
||||
<field name="evaluation"/>
|
||||
<field name="rate_type"/>
|
||||
<field name="min_degree"/>
|
||||
<field name="max_degree"/>
|
||||
</tree>
|
||||
|
|
@ -148,6 +156,28 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="education_exam_type_form" model="ir.ui.view">
|
||||
<field name="name">education.exam.type.form</field>
|
||||
<field name="model">education.exam.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Exams Type">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="education_exam_type_tree" model="ir.ui.view">
|
||||
<field name="name">education.exam.type.tree</field>
|
||||
<field name="model">education.exam.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Exams Type">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Action-->
|
||||
<record model="ir.actions.act_window" id="study_material_action">
|
||||
<field name="name">Study Material</field>
|
||||
|
|
@ -159,5 +189,17 @@
|
|||
<field name="res_model">education.illiterate.reason</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="education_delay_reason_action">
|
||||
<field name="name">Education Delay Reason</field>
|
||||
<field name="res_model">education.delay.reason</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="education_exam_type_action">
|
||||
<field name="name">Exams Type</field>
|
||||
<field name="res_model">education.exam.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -11,19 +11,27 @@
|
|||
name="education_status_type"
|
||||
decoration-success="education_status_type == 'current'"
|
||||
decoration-danger="education_status_type == 'previous'"
|
||||
widget="badge"
|
||||
widget="badge"
|
||||
invisible="1"
|
||||
/>
|
||||
<!-- <field name="education_status" optional="hide"/> -->
|
||||
<field name="case_study" optional="hide"/>
|
||||
<field name="case_study" optional="show"/>
|
||||
<field name="intermittent_reason_id" attrs="{'invisible': [('case_study', '!=', 'intermittent')], 'required': [('case_study', '=', 'intermittent')]}"/>
|
||||
<field name="intermittent_date" attrs="{'invisible': [('case_study', '!=', 'intermittent')], 'required': [('case_study', '=', 'intermittent')]}"/>
|
||||
<field name="education_levels" optional="show" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="entities" optional="show" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="classroom" optional="show" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="rate_type"/>
|
||||
<field name="percentage"/>
|
||||
<field name="degree"/>
|
||||
<field name="education_entity" optional="hide"/>
|
||||
<field name="education_period_id" optional="show"/>
|
||||
<field name="education_start_date" optional="show"/>
|
||||
<field name="education_end_date" optional="show"/>
|
||||
<field name="degree" optional="show"/>
|
||||
<field name="percentage" optional="show"/>
|
||||
<field name="family_member_age" optional="show"/>
|
||||
<field name="family_member_delay" attrs="{'invisible': [('family_member_delay', '=', False)]}"/>
|
||||
<field name="delay_reason_id" options="{'no_create_edit': True, 'no_create': True}" attrs="{'invisible': [('family_member_delay', '=', False)], 'required': [('family_member_delay', '=', True)]}"/>
|
||||
<field name="educational_certificate" optional="hide"/>
|
||||
<field name="entities" optional="hide"/>
|
||||
<field name="education_levels" optional="hide"/>
|
||||
<field name="classroom" optional="hide"/>
|
||||
<field name="specialization_ids" optional="hide"/>
|
||||
<!-- <field name="weak_study" optional="hide"/> -->
|
||||
</tree>
|
||||
|
|
@ -46,13 +54,15 @@
|
|||
|
||||
<!-- Basic Info -->
|
||||
<group>
|
||||
<field name="education_status_type" required="1"/>
|
||||
<field name="education_status_type" required="0" invisible="1"/>
|
||||
</group>
|
||||
|
||||
<!-- Conditional Fields (Current) -->
|
||||
<group attrs="{'invisible': [('education_status_type', '!=', 'current')]}">
|
||||
<group>
|
||||
<!-- <field name="education_status"/> -->
|
||||
<field name="case_study"/>
|
||||
<field name="intermittent_reason_id" attrs="{'invisible': [('case_study', '!=', 'intermittent')], 'required': [('case_study', '=', 'intermittent')]}"/>
|
||||
<field name="intermittent_date" attrs="{'invisible': [('case_study', '!=', 'intermittent')], 'required': [('case_study', '=', 'intermittent')]}"/>
|
||||
</group>
|
||||
|
||||
<!-- Conditional Fields (Previous) -->
|
||||
|
|
@ -62,15 +72,20 @@
|
|||
|
||||
<!-- Other Fields -->
|
||||
<group>
|
||||
<field name="education_entity"/>
|
||||
<field name="education_start_date"/>
|
||||
<field name="education_end_date"/>
|
||||
<field name="educational_certificate" widget="many2many_attachment_preview" />
|
||||
<field name="entities"/>
|
||||
<field name="education_levels"/>
|
||||
<field name="classroom"/>
|
||||
<field name="degree"/>
|
||||
<field name="education_levels" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="entities" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="education_period_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="classroom" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="rate_type"/>
|
||||
<field name="percentage"/>
|
||||
<field name="degree"/>
|
||||
<field name="education_entity"/>
|
||||
<field name="education_start_date" force_save="1"/>
|
||||
<field name="education_end_date" force_save="1"/>
|
||||
<field name="family_member_age"/>
|
||||
<field name="family_member_delay" attrs="{'invisible': [('family_member_delay', '=', False)]}"/>
|
||||
<field name="delay_reason_id" attrs="{'invisible': [('family_member_delay', '=', False)], 'required': [('family_member_delay', '=', True)]}"/>
|
||||
<field name="educational_certificate" widget="many2many_attachment_preview" />
|
||||
<field name="specialization_ids"/>
|
||||
</group>
|
||||
<notebook>
|
||||
|
|
|
|||
|
|
@ -211,6 +211,20 @@
|
|||
attrs="{'invisible': [('education_status', '!=', 'educated')]}">
|
||||
<field name="member_education_status_ids" mode="tree,form"/>
|
||||
</page>
|
||||
<page string="Exams Degrees" attrs="{'invisible': [('education_status', '!=', 'educated')]}">
|
||||
<field name="exam_ids" mode="tree" options="{'no_open': True}"
|
||||
widget="one2many_list">
|
||||
<tree editable="bottom">
|
||||
<field name="member_id" invisible="1"/>
|
||||
<field name="exam_id" options="{'no_create_edit': True, 'no_create': True}"/>
|
||||
<field name="exam_degree"/>
|
||||
<field name="exam_date"/>
|
||||
<field name="exam_attachment" widget="binary" filename="exam_attachment_file_name"/>
|
||||
<field name="exam_attachment_file_name" invisible="1"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Suspend Reason"
|
||||
attrs="{'invisible': [('action_type','not in',['suspended','exception'])]}">
|
||||
<group>
|
||||
|
|
@ -239,6 +253,7 @@
|
|||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" mode="tree" options="{'no_open': True}"
|
||||
widget="one2many_list">
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -17,4 +17,4 @@ class ResPartner(models.Model):
|
|||
is_donor_vendor_sponsor = rec.is_donor or rec.is_sponsor_portal or rec.is_vendor
|
||||
|
||||
if is_family_or_beneficiary and is_donor_vendor_sponsor:
|
||||
raise ValidationError(_("A contact cannot be both Family/Beneficiary and Donor/Member/Sponsor at the same time"))
|
||||
raise ValidationError(_("A contact cannot be both Family/Beneficiary and Donor/Member/Sponsor at the same time!"))
|
||||
|
|
@ -239,7 +239,7 @@ class TakafulSponsor(models.Model):
|
|||
second_name = values.get('second_name')
|
||||
middle_name = values.get('middle_name')
|
||||
family_name = values.get('family_name')
|
||||
name = self.sponsor_title.browse(sponsor_title).name + " " + first_name + " " + second_name + " " + middle_name + " " + family_name
|
||||
name = f'{self.sponsor_title.browse(sponsor_title).name} {first_name} {second_name} {middle_name} {family_name}'
|
||||
values.update({'name': name})
|
||||
|
||||
values.update({'lang': 'ar_001'})
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue