
from odoo import models, fields, api

class SosNcmrWizard(models.TransientModel):
    _name = 'ncmr_report_wizard'
    _description = 'NCMR Report Wizard'

    from_date = fields.Date(
        string="From Date",
        default=lambda self: fields.Date.to_date("2025-01-01")  # Default to January 1, 2025
    )
    to_date = fields.Date(
        string="To Date",
        default=fields.Date.today  # Default to today's date
    )
   
    def generate_ncmrreport(self):
        return self.env['sos_ncmr'].action_ncmr_report_orm_btn(self.from_date,self.to_date,force_download=True)

