from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError,Warning
from datetime import date,datetime,timedelta

class accounting_file(models.Model):
    _name = 'accounting.file'
    _description = 'accounting files'

    accounting_file = fields.Binary('accounting file', readonly=True)
    document_fname=fields.Char(default='undefined')
    exported_date=fields.Date(string='Exported Date',tracking=True, readonly=True)
    start_date=fields.Date(string='Start Date',tracking=True, readonly=True)
    end_date=fields.Date(string='End Date',tracking=True, readonly=True)

class cdr_accounting_file(models.Model):
    _name = 'cdr.accounting.file'
    _description = 'Centre de retraite accounting files'

    accounting_file = fields.Binary('accounting file', readonly=True)
    document_fname=fields.Char(default='undefined')
    exported_date=fields.Date(string='Exported Date',tracking=True, readonly=True)
    start_date=fields.Date(string='Start Date',tracking=True, readonly=True)
    end_date=fields.Date(string='End Date',tracking=True, readonly=True)