[UPD] odex_takaful
This commit is contained in:
parent
ac9d7fc999
commit
cfa4265b01
|
|
@ -142,6 +142,7 @@ class DonationsDetailsLines(models.Model):
|
|||
help='Payment method selected during payment registration',
|
||||
)
|
||||
payment_method_type = fields.Selection(related='payment_method_display.payment_method', string='Payment Method Type', store=True)
|
||||
benefit_kafala_status = fields.Selection(related='benefit_id.kafala_status', string="Benefit Kafala Status")
|
||||
|
||||
|
||||
@api.onchange('family_id')
|
||||
|
|
@ -149,7 +150,6 @@ class DonationsDetailsLines(models.Model):
|
|||
for rec in self:
|
||||
rec.benefit_ids = False
|
||||
|
||||
|
||||
@api.depends('benefit_id.diseases_attachment_ids')
|
||||
def _compute_get_diseases(self):
|
||||
for rec in self:
|
||||
|
|
|
|||
|
|
@ -945,6 +945,8 @@ class TakafulSponsorship(models.Model):
|
|||
is_donations_coordinator = fields.Boolean(string="Is Donations Coordinator", compute='_compute_is_coordinator')
|
||||
is_sponsorship_coordinator = fields.Boolean(string="Is Sponsorship Coordinator", compute='_compute_is_coordinator')
|
||||
amount_paid = fields.Float(string='Amount Paid', compute='_compute_amount_paid')
|
||||
include_payments = fields.Boolean(default=True)
|
||||
|
||||
|
||||
@api.depends('payment_ids', 'payment_ids.move_id.state')
|
||||
def _compute_amount_paid(self):
|
||||
|
|
@ -959,7 +961,7 @@ class TakafulSponsorship(models.Model):
|
|||
|
||||
@api.depends('payment_ids')
|
||||
def _compute_state(self):
|
||||
for sponsorship in self:
|
||||
for sponsorship in self.filtered('include_payments'):
|
||||
if not sponsorship.payment_ids:
|
||||
sponsorship.state = sponsorship.state
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue