Merge pull request #6018 from expsa/samir_aladawi_sequnce_code_creation

[FIX] odex_takaful: bypass changing sponsor phone when sponsor is faa…
This commit is contained in:
SamirLADOUI-sa 2026-01-06 13:42:52 +01:00 committed by GitHub
commit ff7cf33f8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -236,7 +236,8 @@ class TakafulSponsorship(models.Model):
@api.depends('sponsor_id','sponsor_id.mobile')
def _compute_sponsor_phone(self):
for rec in self:
rec.sponsor_phone = rec.sponsor_id.mobile if rec.sponsor_id else False
if rec.sponsor_id.id != rec.env.company.faal_kheer_partner_id.id:
rec.sponsor_phone = rec.sponsor_id.mobile if rec.sponsor_id else False
def compute_days_after_payment(self):
"""Check if the number of hours passed after payment is within the configured limit"""