2014-12-03 02:16:05 +00:00
|
|
|
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"),
|
2014-12-04 08:37:54 +00:00
|
|
|
'ref': fields.Char("Ref"),
|
2014-12-03 02:16:05 +00:00
|
|
|
'invoice_id': fields.Many2One("account.invoice","Invoice"),
|
2015-03-02 04:03:07 +00:00
|
|
|
'patient_id': fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']]),
|
2014-12-03 02:16:05 +00:00
|
|
|
'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()
|