clinic/netforce_clinic/models/import_payment_line.py

23 lines
773 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"),
'ref': fields.Char("Ref"),
'invoice_id': fields.Many2One("account.invoice","Invoice"),
'patient_id': fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']]),
'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()