from netforce.model import Model, fields class PaymentLine(Model): _name="import.clinic.payment.line" _string="Race" _fields={ 'import_payment_id': fields.Many2One("import.clinic.payment","Payment",required=True,on_delete="cascade"), 'date': fields.Date("Date"), 'invoice_id': fields.Many2One("account.invoice","Invoice"), 'patient_id': fields.Many2One("clinic.patient","Patient"), 'hd_case_id': fields.Many2One("clinic.hd.case","HDCase"), 'state': fields.Selection([['match','Match'],['unmatch','Unmatch']],"State"), 'amount': fields.Float("Amount"), } _defaults={ 'state': 'unmatch', } PaymentLine.register()