diff --git a/odex25_ensan/odex_takaful/models/donation_details_lines.py b/odex25_ensan/odex_takaful/models/donation_details_lines.py index e6637c2ae..919ff177e 100644 --- a/odex25_ensan/odex_takaful/models/donation_details_lines.py +++ b/odex25_ensan/odex_takaful/models/donation_details_lines.py @@ -67,6 +67,8 @@ class DonationsDetailsLines(models.Model): benefits_count = fields.Integer(string='Benefits Count', compute='_get_benefits_count') total_donation_amount = fields.Float(string='Total Donation Amount', compute='_get_total_donation_amount') total_months_amount = fields.Float(string='Total Months Amount', compute='_get_total_months_amount') + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) sponsorships_computed = fields.Boolean(copy=False, readonly=True) direct_debit = fields.Boolean(string='Direct Debit') benefit_id_number = fields.Char("Benefit ID Number") diff --git a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py index 2ae1fb199..b5218990b 100644 --- a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py @@ -655,6 +655,8 @@ class TakafulSponsorship(models.Model): compute='_check_if_has_delay', store=True) contribution_value = fields.Float(string="Contribution Value") load_amount = fields.Float(string="Load Amount Per Person") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) total_contribution = fields.Float(string="Contributions Total", compute='calculate_total_paid') diff --git a/odex25_ensan/odex_takaful/models/takaful_sponsor_operation.py b/odex25_ensan/odex_takaful/models/takaful_sponsor_operation.py index 285f04885..431f2e960 100644 --- a/odex25_ensan/odex_takaful/models/takaful_sponsor_operation.py +++ b/odex25_ensan/odex_takaful/models/takaful_sponsor_operation.py @@ -45,6 +45,8 @@ class TakafulSponsorOperation(models.Model): origin_id = fields.Integer(readonly=True) period_code = fields.Char(string="Period Code", compute='_compute_period_filter') amount = fields.Float(string="Amount") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) def _compute_period_filter(self): """ Extract period code from date """ diff --git a/odex25_ensan/odex_takaful/views/donations_details_lines.xml b/odex25_ensan/odex_takaful/views/donations_details_lines.xml index a908bb1f9..0a713c2d5 100644 --- a/odex25_ensan/odex_takaful/views/donations_details_lines.xml +++ b/odex25_ensan/odex_takaful/views/donations_details_lines.xml @@ -66,7 +66,7 @@ - + @@ -74,10 +74,11 @@ - - - - + + + + + @@ -172,14 +173,19 @@ - - + + + - + @@ -214,20 +220,22 @@ - - - - diff --git a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml index f1026f71a..e0fd03fe8 100644 --- a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml @@ -129,7 +129,7 @@ force_save="1" options="{'no_create': True, 'no_create_edit': True}"/> - @@ -161,7 +161,7 @@ attrs="{'invisible': [('is_gift', '!=', 'yes')]}"> - + @@ -177,7 +177,7 @@ - + @@ -248,16 +248,21 @@ attrs="{'column_invisible': [('parent.donation_mechanism','!=','with_conditions'),('parent.record_type','!=','sponsorship')]}"/> - - + - - +