from odoo import models, fields, api
from dateutil.relativedelta import relativedelta


class LoanMonthlyInterest(models.Model):
    _name = "loan.monthly.interest"
    _description = "Monthly Interest Details"

    loan_id = fields.Many2one('loan.management', string="Due Loan", ondelete='cascade')
    date_from = fields.Date(string="From")
    date_to = fields.Date(string="To")
    interest_amount = fields.Float(string="Interest", digits=(16,2))
