clinic/netforce_clinic/models/payment.py

20 lines
484 B
Python

from netforce.model import Model, fields
class Payment(Model):
_name="clinic.payment"
_transient=True
_fields={
'hd_case_id': fields.Many2One("clinic.hd.case","HD Case",on_delete="cascade"),
'payment_id': fields.Many2One("account.payment","Payment",on_delete="cascade"),
'account_id': fields.Many2One("account.account","Account"),
'amount': fields.Float("Amount"),
}
_defaults={
'amount': 0.0,
}
Payment.register()