diff --git a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py index 037084157..ee46b8110 100644 --- a/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_takaful/odex_takaful/models/takaful_sponorship_model.py @@ -1659,7 +1659,11 @@ class TakafulSponsorship(models.Model): else: pass #self.action_send_whatsapp() - + direct_debit_sponsorship_line_ids = (self.donations_details_lines | self.donations_details_lines_mechanism_ids).filtered( + lambda l: l.direct_debit) + for dd_line in direct_debit_sponsorship_line_ids: + for sched_line in dd_line.sponsorship_scheduling_line_ids: + sched_line.cron_process_scheduled_payments() def action_send_whatsapp(self): config = self.env['ir.config_parameter'].sudo()