clinic/netforce_clinic/models/import_payment_line.py

22 lines
707 B
Python

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()