Merge pull request #6327 from expsa/samir_aladawi_mother_orphan_report

[FIX] odex_takaful
This commit is contained in:
SamirLADOUI-sa 2026-01-22 17:32:23 +01:00 committed by GitHub
commit 07fdb72cf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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