From 5306cfd462f20b52fd37eab3cbd985d3dfcadb7c Mon Sep 17 00:00:00 2001 From: eman Date: Tue, 17 Dec 2024 16:59:02 +0200 Subject: [PATCH] Sponsor(task03) --- .../odex_takaful/data/sequence_data.xml | 21 +- .../odex_takaful/models/takaful_conf.py | 23 +- .../models/takaful_sponorship_model.py | 334 +++++++++++------- .../odex_takaful/security/ir.model.access.csv | 2 + .../views/takaful_sponorship_view.xml | 161 +++++---- 5 files changed, 342 insertions(+), 199 deletions(-) diff --git a/odex25_ensan/odex_takaful/data/sequence_data.xml b/odex25_ensan/odex_takaful/data/sequence_data.xml index 42f242ab2..eddfbaa7b 100644 --- a/odex25_ensan/odex_takaful/data/sequence_data.xml +++ b/odex25_ensan/odex_takaful/data/sequence_data.xml @@ -43,6 +43,25 @@ 4 - + + Point Of Sale Sequence + point.of.sale.sequence + PO/ + + + + + 4 + + + Payment Details Sequence + payment.details.sequence + Payment/ + + + + + 4 + \ No newline at end of file diff --git a/odex25_ensan/odex_takaful/models/takaful_conf.py b/odex25_ensan/odex_takaful/models/takaful_conf.py index 9fc69d137..193d2d2f5 100644 --- a/odex25_ensan/odex_takaful/models/takaful_conf.py +++ b/odex25_ensan/odex_takaful/models/takaful_conf.py @@ -4,9 +4,28 @@ from odoo import api, fields, models, _ class DonationsItems(models.Model): _name = "donations.items" - _description = "DonationsItems" + _description = "Donation Items" name = fields.Char(string="Donation Name") donation_type = fields.Selection([('donation', 'Donation'),('waqf', 'Waqf'),('sponsorship', 'Sponsorship'),], string='Donation Type') branch_custom_id = fields.Many2one('branch.settings', string="Branch") - show_donation_item = fields.Boolean(string='Show Donation Item') \ No newline at end of file + show_donation_item = fields.Boolean(string='Show Donation Item') + fixed_value = fields.Boolean(string='Is Fixed Value?') + fixed_donation_amount = fields.Float(string='Donation Amount') + account_id = fields.Many2one('account.account', string="Account",domain="[('user_type_id.id','=',13)]") + +class PointsOfSaleCustom(models.Model): + _name = "points.of.sale.custom" + _description = "Points Of Sale Custom" + + name = fields.Char(string="Sequence/Point Name",readonly=True) + department_name = fields.Selection([('men', 'Men'),('women', 'Women')], string='Department Name') + branch_custom_id = fields.Many2one('branch.settings', string="Branch") + journal_id = fields.Many2one('account.journal', string="Journal",domain="[('type','=','bank')]") + + @api.model + def create(self, vals): + res = super(PointsOfSaleCustom, self).create(vals) + if not res.name or res.name == _('New'): + res.name = self.env['ir.sequence'].sudo().next_by_code('point.of.sale.sequence') or _('New') + return res diff --git a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py index 1ee081469..9930c750a 100644 --- a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py @@ -9,11 +9,6 @@ from datetime import timedelta from dateutil.relativedelta import relativedelta from dateutil.parser import parse -import logging - -_logger = logging.getLogger(__name__) - - def trunc_datetime(someDate): # Compare two dates based on Month and Year only return someDate.replace(day=1, hour=0, minute=0, second=0, microsecond=0) @@ -46,12 +41,7 @@ class TakafulSponsorship(models.Model): sponsor_id = fields.Many2one('takaful.sponsor',string='Sponsor Name',domain="[('branch_custom_id', '=', branch_custom_id),('branch_custom_id','!=',False)]") member_id = fields.Many2one('res.partner',string='Member Name',domain="[('is_member', '=', True)]") - - is_gift = fields.Selection([ - ('no', 'No'), - ('yes', 'Yes')], - string='Is Gift To Person', - ) + is_gift = fields.Selection([('no', 'No'),('yes', 'Yes')],string='Is Gift To Person') gifter_id = fields.Many2one( 'takaful.sponsor', string='The Gifter To' @@ -61,10 +51,7 @@ class TakafulSponsorship(models.Model): gifter_message = fields.Text(string='Message To Gifter') sponsorship_type = fields.Selection([('person', 'Individual'),('group', 'Group')],string='Sponsorship Type',tracking=True) - code = fields.Char(string="Code", - copy=False, - readonly=True) - + code = fields.Char(string="Code",copy=False,readonly=True) benefit_type = fields.Selection([('orphan', 'Orphans'),('widow', 'Widows')],string='Sponsorship Beneficiary Type',tracking=True) branch_custom_id = fields.Many2one('branch.settings', string="Branch") sponsorship_creation_date = fields.Datetime(string="Sponsorship Creation Date", default=fields.Datetime.now) @@ -79,14 +66,11 @@ class TakafulSponsorship(models.Model): members_domain_ids = fields.Many2many(comodel_name='family.member', compute='_compute_domain_ids') # This is if for one person, and not a group. benefit_id = fields.Many2one('family.member',string='Beneficiary Name',ondelete='set null',domain = "[('id', 'in',members_domain_ids)]") - family_id = fields.Many2one( - 'grant.benefit', - string='Family', - ondelete='set null',related="benefit_id.benefit_id" - ) + family_id = fields.Many2one('grant.benefit',string='Family',ondelete='set null',related="benefit_id.benefit_id") education_status = fields.Selection(string='Education Status',selection=[('educated', 'educated'), ('illiterate', 'illiterate'),('under_study_age','Under Study Age')]) education_level = fields.Many2one("education.level", string='Education Levels') - sponsorship_duration = fields.Selection([('temporary', 'Temporary'),('permanent', 'Permanent')],string='Sponsorship Duration',required=True,default='permanent',tracking=True) + sponsorship_duration = fields.Selection([('temporary', 'Temporary'),('permanent', 'Permanent')],string='Sponsorship Duration',default='permanent',tracking=True) + total_sponsorship_amount = fields.Float(string='Total Sponsorship Amount',compute='_get_total_sponsorship_amount') supporter_status = fields.Selection([ ('no', 'Not Exist'), ('yes', 'Exist')], @@ -97,6 +81,28 @@ class TakafulSponsorship(models.Model): has_needs = fields.Boolean(store=True) donations_details_lines = fields.One2many('donations.details.lines','sponsorship_id') + payment_details_lines = fields.One2many('payment.details.lines','sponsorship_id') + + @api.constrains('payment_details_lines') + def check_payment_amount(self): + total_amount = 0 + for rec in self.payment_details_lines: + total_amount += rec.donation_amount + if total_amount != self.total_sponsorship_amount: + raise ValidationError( + _('Total Payment Amount Should be Total Sponsorship Amount')) + + @api.constrains('donations_details_lines') + def check_donation_types(self): + # Search for an existing record + record_exist = self.env["donations.details.lines"].search( + [('donation_type', '=', 'sponsorship'), + ('sponsorship_id', '=', self.id)], + ) + + # Raise error if record already exists + if record_exist and len(record_exist) > 1: + raise ValidationError(_("You cannot Add more than one sponsorship")) @api.constrains('end_date') def check_end_date(self): @@ -122,6 +128,16 @@ class TakafulSponsorship(models.Model): rec.supporter_status = 'no' else: rec.supporter_status = '' + @api.depends('donations_details_lines') + def _get_total_sponsorship_amount(self): + for rec in self: + rec.total_sponsorship_amount = sum(line.donation_amount for line in rec.donations_details_lines) + + @api.onchange('donations_details_lines') + def onchange_donations_details_lines(self): + for rec in self: + rec.benefit_ids = rec.donations_details_lines.benefit_ids.ids + @api.depends('gender','education_status','education_level','sponsorship_type','benefit_type','age_category_id') def _compute_domain_ids(self): # Create a domain @@ -212,7 +228,7 @@ class TakafulSponsorship(models.Model): city_id = fields.Many2one( 'res.country.city',string='District') - benefit_count = fields.Integer(string='Sponsorship Beneficiaries Number') + benefit_count = fields.Integer(string='Sponsorship Beneficiaries Number',compute="_get_benefits_count") start_date = fields.Date(string="Sponsorship Start Date", copy=False) end_date = fields.Date(string="Sponsorship End Date") @@ -226,10 +242,7 @@ class TakafulSponsorship(models.Model): string='Sponsorship Beneficiaries Classification', tracking=True ) - benefit_ids = fields.Many2many( - 'family.member', - string='Beneficiaries Names', - ) + benefit_ids = fields.Many2many('family.member',string='Beneficiaries Names') with_orphan_ids = fields.Many2many( 'grant.benefit',relation='takaful_sponsor_grant_benefit_rel', @@ -268,9 +281,7 @@ class TakafulSponsorship(models.Model): due_days = fields.Integer(string='Overdue in Days', compute='_check_if_has_delay', store=True) contribution_value = fields.Float(string="Contribution Value") - load_amount = fields.Float(string="Load Amount Per Person", - compute='_compute_load_amount') - + load_amount = fields.Float(string="Load Amount Per Person") total_contribution = fields.Float(string="Contributions Total", compute='calculate_total_paid') @@ -297,15 +308,19 @@ class TakafulSponsorship(models.Model): voucher_ids = fields.One2many('account.move','sponsorship_id',string='Vouchers', copy=False) # payment_ids = fields.One2many('account.payment','sponsorship_id',string='Payments', copy=False) - @api.depends('contribution_value', 'benefit_ids', 'sponsorship_type') - def _compute_load_amount(self): - """ Calculate load amount of sponsorship for a person """ + # @api.depends('contribution_value', 'benefit_ids', 'sponsorship_type') + # def _compute_load_amount(self): + # """ Calculate load amount of sponsorship for a person """ + # for rec in self: + # if rec.benefit_ids and rec.contribution_value > 0 and rec.sponsorship_type == 'group': + # rec.load_amount = float( + # rec.contribution_value / len(rec.benefit_ids)) + # else: + # rec.load_amount = rec.contribution_value + @api.depends('benefit_ids') + def _get_benefits_count(self): for rec in self: - if rec.benefit_ids and rec.contribution_value > 0 and rec.sponsorship_type == 'group': - rec.load_amount = float( - rec.contribution_value / len(rec.benefit_ids)) - else: - rec.load_amount = rec.contribution_value + rec.benefit_count = len(rec.benefit_ids) def voucher_total_paid(self): self.total_voucher = len(self.voucher_ids) @@ -542,19 +557,19 @@ class TakafulSponsorship(models.Model): rec.due_days = 0 # On Change - @api.onchange('sponsorship_class', 'sponsorship_type', 'benefit_id', 'benefit_ids') - def sponsorship_fully_value(self): - if self.sponsorship_class == 'fully' and self.benefit_ids and self.sponsorship_type == 'group': - self.update({'contribution_value': sum( - self.benefit_ids.mapped('benefit_needs_value'))}) - elif self.sponsorship_class == 'fully' and self.benefit_id and self.sponsorship_type == 'person': - self.update( - {'contribution_value': self.benefit_id.benefit_needs_value}) - else: - self.update({'contribution_value': 0}) + # @api.onchange('sponsorship_class', 'sponsorship_type', 'benefit_id', 'benefit_ids') + # def sponsorship_fully_value(self): + # if self.sponsorship_class == 'fully' and self.benefit_ids and self.sponsorship_type == 'group': + # self.update({'contribution_value': sum( + # self.benefit_ids.mapped('benefit_needs_value'))}) + # elif self.sponsorship_class == 'fully' and self.benefit_id and self.sponsorship_type == 'person': + # self.update( + # {'contribution_value': self.benefit_id.benefit_needs_value}) + # else: + # self.update({'contribution_value': 0}) - @api.constrains('contribution_value') - def check_contribution_value(self): + # @api.constrains('contribution_value') + # def check_contribution_value(self): # if not self.sponsor_id: # raise ValidationError( # _(u'Please Select The Sponsor')) @@ -578,28 +593,28 @@ class TakafulSponsorship(models.Model): # if not self.benefit_id and self.sponsorship_type == 'person': # raise ValidationError( # _(u'Please Select a Beneficiary For Sponsorship Person')) - - if len(self.benefit_ids) < 2 and self.sponsorship_type == 'group': - raise ValidationError( - _(u'Please Select At least Two Beneficiaries For Sponsorship Group')) - - if self.sponsorship_class == 'partial': - default_sponsorship = int( - self.env['ir.config_parameter'].sudo().get_param('odex_takaful_base.min_kafala', 0)) - - if self.benefit_ids and self.sponsorship_type == 'group': - benefit_count = len(self.benefit_ids) - else: - benefit_count = 1 - - if default_sponsorship <= 0: - raise ValidationError( - _(u'Min kafala value should be defined by administration')) - - total_sponsorship = default_sponsorship * benefit_count - if self.contribution_value < total_sponsorship: - raise ValidationError( - _(u'Kafala value should be equal or greater than') + ' ' + str(total_sponsorship)) + # + # if len(self.benefit_ids) < 2 and self.sponsorship_type == 'group': + # raise ValidationError( + # _(u'Please Select At least Two Beneficiaries For Sponsorship Group')) + # + # if self.sponsorship_class == 'partial': + # default_sponsorship = int( + # self.env['ir.config_parameter'].sudo().get_param('odex_takaful_base.min_kafala', 0)) + # + # if self.benefit_ids and self.sponsorship_type == 'group': + # benefit_count = len(self.benefit_ids) + # else: + # benefit_count = 1 + # + # if default_sponsorship <= 0: + # raise ValidationError( + # _(u'Min kafala value should be defined by administration')) + # + # total_sponsorship = default_sponsorship * benefit_count + # if self.contribution_value < total_sponsorship: + # raise ValidationError( + # _(u'Kafala value should be equal or greater than') + ' ' + str(total_sponsorship)) # Model Operations @api.model @@ -1048,83 +1063,144 @@ class DonationsDetailsLines(models.Model): sponsorship_id = fields.Many2one('takaful.sponsorship', string="Sponsorship") donation_amount = fields.Float(string='Donation Amount') donation_mechanism = fields.Selection([('with_conditions', 'With Conditions'),('without_conditions', 'Without Conditions')],string='Donation Mechanism') - benefit_type = fields.Selection([('orphan', 'Orphans'),('widow', 'Widows'),('both', 'Both')],required=True,string='Sponsorship Beneficiary Type',tracking=True) + benefit_type = fields.Selection([('orphan', 'Orphans'),('widow', 'Widows'),('both', 'Both')],string='Sponsorship Beneficiary Type',tracking=True) sponsorship_type = fields.Selection([('person', 'Individual'),('group', 'Group')],string='Sponsorship Type',tracking=True) gender = fields.Selection(selection=[('male', 'Male'), ('female', 'Female')], string="Gender") age_category_id = fields.Many2one('age.category', string='Age Category') education_status = fields.Selection(string='Education Status',selection=[('educated', 'educated'), ('illiterate', 'illiterate'),('under_study_age', 'Under Study Age')]) education_level = fields.Many2one("education.level", string='Education Levels') benefit_id = fields.Many2one('family.member',string='Beneficiary Name',ondelete='set null',domain = "[('id', 'in',members_domain_ids)]") + family_id = fields.Many2one('grant.benefit',string='Family',ondelete='set null',related="benefit_id.benefit_id") members_domain_ids = fields.Many2many(comodel_name='family.member', compute='_compute_domain_ids') benefit_ids = fields.Many2many('family.member',string='Beneficiaries Names') sponsorship_duration = fields.Selection([('temporary', 'Temporary'),('permanent', 'Permanent')],string='Sponsorship Duration',default='permanent',tracking=True) start_date = fields.Date(string="Sponsorship Start Date", copy=False) end_date = fields.Date(string="Sponsorship End Date") payment_option = fields.Selection([('month', 'Monthly'),('once', 'For Once')], string='Payment Option', default='month') + fixed_value = fields.Boolean(string='Is Fixed Value?',related='donation_name.fixed_value') @api.depends('gender', 'education_status', 'education_level', 'sponsorship_type', 'benefit_type', 'age_category_id') def _compute_domain_ids(self): - # Create a domain - self.members_domain_ids = [(6, 0, [])] - if self.benefit_type == 'orphan' and self.sponsorship_type: - base_domain = \ - [ - ('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), - ('member_status', '=', 'benefit'), - '|', - ('relationn.relation_type', '=', 'daughter'), - ('relationn.relation_type', '=', 'son') - ] - if self.gender: - if self.gender == 'female': - base_domain = [ - ('state', 'in', ('second_approve', 'temporarily_suspended', 'suspended_first_approve')), - ('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'daughter')] - if self.gender == 'male': - base_domain = [ - ('state', 'in', ('second_approve', 'temporarily_suspended', 'suspended_first_approve')), - ('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'son')] - if self.education_status: - base_domain.append(('education_status', '=', self.education_status)) - if self.education_level: - base_domain.append(('education_levels', '=', self.education_level.id)) - if self.age_category_id: - base_domain.append(('age', '<=', self.age_category_id.max_age)) - base_domain.append(('age', '>=', self.age_category_id.min_age)) - self.members_domain_ids = self.env['family.member'].sudo().search(base_domain) - domain = {'benefit_id': [('id', 'in', self.members_domain_ids.ids)]} - return {'domain': domain} - if self.benefit_type == 'widow' and self.sponsorship_type: - base_domain = [('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), - ('member_status', '=', 'benefit'), '|', ('relationn.relation_type', '=', 'mother'), - ('relationn.relation_type', '=', 'replacement_mother')] - if self.education_status: - base_domain.append(('education_status', '=', self.education_status)) - if self.education_level: - base_domain.append(('education_levels', '=', self.education_level.id)) - if self.age_category_id: - base_domain.append(('age', '<=', self.age_category_id.max_age)) - base_domain.append(('age', '>=', self.age_category_id.min_age)) - self.members_domain_ids = self.env['family.member'].sudo().search(base_domain) - domain = {'benefit_id': [('id', 'in', self.members_domain_ids.ids)]} - return {'domain': domain} - if self.benefit_type == 'both' and self.sponsorship_type: - base_domain = [('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), - ('member_status', '=', 'benefit')] - if self.education_status: - base_domain.append(('education_status', '=', self.education_status)) - if self.education_level: - base_domain.append(('education_levels', '=', self.education_level.id)) - if self.age_category_id: - base_domain.append(('age', '<=', self.age_category_id.max_age)) - base_domain.append(('age', '>=', self.age_category_id.min_age)) - self.members_domain_ids = self.env['family.member'].sudo().search(base_domain) - domain = {'benefit_id': [('id', 'in', self.members_domain_ids.ids)]} - return {'domain': domain} + for rec in self: + # Create a domain + rec.members_domain_ids = [(6, 0, [])] + if rec.benefit_type == 'orphan' and rec.sponsorship_type: + base_domain = \ + [ + ('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), + ('member_status', '=', 'benefit'), + '|', + ('relationn.relation_type', '=', 'daughter'), + ('relationn.relation_type', '=', 'son') + ] + if rec.gender: + if rec.gender == 'female': + base_domain = [ + ('state', 'in', ('second_approve', 'temporarily_suspended', 'suspended_first_approve')), + ('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'daughter')] + if rec.gender == 'male': + base_domain = [ + ('state', 'in', ('second_approve', 'temporarily_suspended', 'suspended_first_approve')), + ('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'son')] + if rec.education_status: + base_domain.append(('education_status', '=', rec.education_status)) + if rec.education_level: + base_domain.append(('education_levels', '=', rec.education_level.id)) + if rec.age_category_id: + base_domain.append(('age', '<=', rec.age_category_id.max_age)) + base_domain.append(('age', '>=', rec.age_category_id.min_age)) + rec.members_domain_ids = self.env['family.member'].sudo().search(base_domain) + domain = {'benefit_id': [('id', 'in', rec.members_domain_ids.ids)]} + return {'domain': domain} + if rec.benefit_type == 'widow' and rec.sponsorship_type: + base_domain = [('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), + ('member_status', '=', 'benefit'), '|', ('relationn.relation_type', '=', 'mother'), + ('relationn.relation_type', '=', 'replacement_mother')] + if rec.education_status: + base_domain.append(('education_status', '=', rec.education_status)) + if rec.education_level: + base_domain.append(('education_levels', '=', rec.education_level.id)) + if rec.age_category_id: + base_domain.append(('age', '<=', rec.age_category_id.max_age)) + base_domain.append(('age', '>=', rec.age_category_id.min_age)) + rec.members_domain_ids = self.env['family.member'].sudo().search(base_domain) + domain = {'benefit_id': [('id', 'in', rec.members_domain_ids.ids)]} + return {'domain': domain} + if rec.benefit_type == 'both' and rec.sponsorship_type: + base_domain = [('state', 'in', ['second_approve', 'temporarily_suspended', 'suspended_first_approve']), + ('member_status', '=', 'benefit')] + if rec.education_status: + base_domain.append(('education_status', '=', rec.education_status)) + if rec.education_level: + base_domain.append(('education_levels', '=', rec.education_level.id)) + if rec.age_category_id: + base_domain.append(('age', '<=', rec.age_category_id.max_age)) + base_domain.append(('age', '>=', rec.age_category_id.min_age)) + rec.members_domain_ids = self.env['family.member'].sudo().search(base_domain) + domain = {'benefit_id': [('id', 'in', rec.members_domain_ids.ids)]} + return {'domain': domain} + + @api.onchange('donation_name') + def onchange_donation_name(self): + for rec in self: + if rec.donation_name.fixed_value: + rec.donation_amount = rec.donation_name.fixed_donation_amount @api.onchange('donation_type') def onchange_donation_type(self): for rec in self: if rec.donation_type == 'sponsorship': rec.donation_mechanism = 'with_conditions' + # if not rec.sponsorship_id: + # raise ValidationError(_("Sponsorship ID must be set for sponsorship donations.")) + # + # # Search for an existing record + # record_exist = self.env["donations.details.lines"].search( + # [('donation_type', '=', 'sponsorship'), + # ('sponsorship_id', '=', rec.sponsorship_id.id)], + # limit=1 + # ) + # + # # Raise error if record already exists + # if record_exist: + # raise ValidationError(_("A donation with the same sponsorship ID already exists.")) + +class PaymentDetailsLines(models.Model): + _name = "payment.details.lines" + + payment_method = fields.Selection(selection=[("cash", "Cash"),("card", "Card"),("check", "Check"),("credit_card", "Credit Card")]) + donation_amount = fields.Float(string='Donation Amount') + donation_date = fields.Date(string='Donation Date',default=lambda self: fields.Date.today()) + note = fields.Char(string='Note') + journal_id = fields.Many2one('account.journal', string="Journal") + points_of_sale = fields.Many2one('points.of.sale.custom', string="Point OF sale") + sponsorship_id = fields.Many2one('takaful.sponsorship') + bank_id = fields.Many2one('res.partner.bank',string="Sponsorship Bank") + charity_journal_id = fields.Many2one('account.journal', string="charity Bank",related = 'points_of_sale.journal_id') + name = fields.Char(string="Ref.",readonly=True) + check_number = fields.Char(string='Check Number') + account_payment_method = fields.Many2one('account.payment.method.line',domain="[('payment_type','=','inbound')]",string='Account Payment Method') + + @api.model + def create(self, vals): + res = super(PaymentDetailsLines, self).create(vals) + if not res.name or res.name == _('New'): + res.name = self.env['ir.sequence'].sudo().next_by_code('payment.details.sequence') or _('New') + return res + @api.onchange('journal_id') + def onchange_journal_id(self): + for rec in self: + # Build the dynamic domain + domain = [] + if rec.payment_method == 'cash': + domain = [ + ('type','=','cash') + ] + if rec.payment_method == 'check': + domain = [ + '|',('type', '=', 'cash'),('type', '=', 'bank') + ] + return {'domain': {'journal_id': domain}} + + diff --git a/odex25_ensan/odex_takaful/security/ir.model.access.csv b/odex25_ensan/odex_takaful/security/ir.model.access.csv index e285ddcac..c21d73881 100644 --- a/odex25_ensan/odex_takaful/security/ir.model.access.csv +++ b/odex25_ensan/odex_takaful/security/ir.model.access.csv @@ -22,3 +22,5 @@ access_sponsorship_reason_stop,Full access on sponsorship.reason.stop,model_spon access_donate_for_another_person,access_donate_for_another_person,model_donate_for_another_person,odex_takaful.group_kufula_viewer,1,1,1,1 access_donations_items,access_donations_items,model_donations_items,odex_takaful.group_kufula_viewer,1,1,1,1 access_donations_details_lines,access_donations_details_lines,model_donations_details_lines,odex_takaful.group_kufula_viewer,1,1,1,1 +access_points_of_sale_custom,access_points_of_sale_custom,model_points_of_sale_custom,odex_takaful.group_kufula_viewer,1,1,1,1 +access_payment_details_lines,access_payment_details_lines,model_payment_details_lines,odex_takaful.group_kufula_viewer,1,1,1,1 diff --git a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml index 939def113..32db05a33 100644 --- a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml @@ -71,19 +71,20 @@ - - - + + + - - - - - - - + + + + + + + + @@ -91,63 +92,63 @@ -
+ -
+ - + -
+ -
+ - + -
- - - + + + + + + + @@ -164,21 +165,12 @@ - - - - - - - - - - - - - - + + + + + @@ -197,30 +189,32 @@ - - + + - + + - +

Benefit Details

- - - - - - + + + + + +

+
@@ -237,10 +231,43 @@ + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+