diff --git a/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py b/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py index f3a5b39aa..e4f2c415f 100644 --- a/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py +++ b/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py @@ -16,6 +16,8 @@ class SchedulingLine(models.Model): scheduled_date = fields.Date(string='Scheduled Date', help='Date when the payment should be automatically processed') amount = fields.Float() refunded_amount = fields.Float(string='Refunded Amount') + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) status = fields.Selection([ ('unpaid', 'Unpaid'), ('paid', 'Paid'), diff --git a/odex25_ensan/odex_takaful/models/takaful_conf.py b/odex25_ensan/odex_takaful/models/takaful_conf.py index a90c6cb02..8152f4192 100644 --- a/odex25_ensan/odex_takaful/models/takaful_conf.py +++ b/odex25_ensan/odex_takaful/models/takaful_conf.py @@ -12,6 +12,8 @@ class DonationsItems(models.Model): show_donation_item = fields.Boolean(string='Show Donation Item') fixed_value = fields.Boolean(string='Is Fixed Value?') fixed_donation_amount = fields.Float(string='Donation Amount') + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) account_id = fields.Many2one('account.account', string="Account",domain="[('user_type_id.id','=',13)]") product_id = fields.Many2one('product.product', string="Product", domain="[('type', '=', 'service')]") _quantity = fields.Float(default=0, store=True) diff --git a/odex25_ensan/odex_takaful/models/takaful_contribution_model.py b/odex25_ensan/odex_takaful/models/takaful_contribution_model.py index d89285fdb..77aafa17d 100644 --- a/odex25_ensan/odex_takaful/models/takaful_contribution_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_contribution_model.py @@ -43,6 +43,8 @@ class TakafulContribution(models.Model): string='Operation Type', ) amount = fields.Float(string="Amount") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) note = fields.Text(string='Note/Message') date = fields.Datetime(string="Date", default=fields.Datetime.now) entry_id = fields.Many2one('account.move', string="Entry") diff --git a/odex25_ensan/odex_takaful/models/takaful_grant_benefit_model.py b/odex25_ensan/odex_takaful/models/takaful_grant_benefit_model.py index f3c86562d..0498c5017 100644 --- a/odex25_ensan/odex_takaful/models/takaful_grant_benefit_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_grant_benefit_model.py @@ -129,6 +129,8 @@ class GrantBenefitInvoice(models.Model): string='Target of Beneficiaries', ) paid_amount = fields.Float(string='Paid Amount', readonly=True) + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) partner_id = fields.Many2one('res.partner', string='From', store=True, related='operation_invoice_id.partner_id') @@ -332,6 +334,8 @@ class SponsorshipBenefitArrears(models.Model): related="sponsorship_id.code", store=True) month_amount = fields.Float(string="Month Sponsorship Amount", related="sponsorship_id.load_amount", store=True, readonly=True) + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) arrears_month_number = fields.Integer(string="Arrears Months Number") arrears_total = fields.Float(string="Arrears Total") date = fields.Date('Date', readonly=True, default=fields.Date.today()) diff --git a/odex25_ensan/odex_takaful/models/takaful_month_payment.py b/odex25_ensan/odex_takaful/models/takaful_month_payment.py index d331ff07b..707b221f4 100644 --- a/odex25_ensan/odex_takaful/models/takaful_month_payment.py +++ b/odex25_ensan/odex_takaful/models/takaful_month_payment.py @@ -22,6 +22,8 @@ class MonthPayment(models.Model): account_id = fields.Many2one('account.account', ) date = fields.Date(string="Date", default=fields.Datetime.now) amount = fields.Float(string="Total Amount", compute='_compute_payment_total', store=True) + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) count = fields.Integer(string="Count", compute='_compute_payment_total', store=True) user_id = fields.Many2one('res.users', string="Issued By", default=lambda self: self.env.user) company_id = fields.Many2one('res.company', string="Company", default=lambda self: self.env.user.company_id) @@ -210,6 +212,8 @@ class MonthPaymentLine(models.Model): state = fields.Selection(related="month_id.state", store=True) code = fields.Char(related="month_id.code", store=True) amount = fields.Float(string="Amount") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) """ @api.model diff --git a/odex25_ensan/odex_takaful/models/takaful_sponsorship_payment_model.py b/odex25_ensan/odex_takaful/models/takaful_sponsorship_payment_model.py index ff03a63a1..6fe9d1b9c 100644 --- a/odex25_ensan/odex_takaful/models/takaful_sponsorship_payment_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_sponsorship_payment_model.py @@ -29,6 +29,8 @@ class SponsorshipPayment(models.Model): payment_month_number = fields.Integer(string="Sponsorships Number To Pay") month_amount = fields.Float(string="Sponsorship Amount", related="sponsorship_id.contribution_value",store=True, readonly=True) amount = fields.Float(string="Total Amount", compute="get_amount_month", store=True) + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) iban = fields.Char(string='IBAN / Account Number', tracking=True) transfer_receipt = fields.Binary(string='Transfer Receipt') bank_id = fields.Many2one('res.bank', string="Bank Name") diff --git a/odex25_ensan/odex_takaful/views/payment_details_lines_views.xml b/odex25_ensan/odex_takaful/views/payment_details_lines_views.xml index b084a48fa..a91e257e3 100644 --- a/odex25_ensan/odex_takaful/views/payment_details_lines_views.xml +++ b/odex25_ensan/odex_takaful/views/payment_details_lines_views.xml @@ -31,7 +31,9 @@ - + + diff --git a/odex25_ensan/odex_takaful/views/sponsorship_payment_view.xml b/odex25_ensan/odex_takaful/views/sponsorship_payment_view.xml index 5e573c18b..5c0e5ba24 100644 --- a/odex25_ensan/odex_takaful/views/sponsorship_payment_view.xml +++ b/odex25_ensan/odex_takaful/views/sponsorship_payment_view.xml @@ -32,17 +32,11 @@ -