[FIX] odex_takaful

This commit is contained in:
Samir Ladoui 2026-01-22 17:31:10 +01:00
parent a232831996
commit 76b94f8446
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ class AccountRegisterPayment(models.TransientModel):
for rec in self:
if rec.takaful_payment_method_id and rec.takaful_payment_method_id.journal_id:
sponsorships = self.env['takaful.sponsorship'].browse(self.env.context.get('sponsorship_id'))
if self.env.context.get('wizard_force_show_all'):
sponsorships = sponsorships.sudo()
branch_ids = sponsorships.mapped('branch_custom_id.id')
rec.journal_id = rec.takaful_payment_method_id.journal_id.id