2014-10-20 11:49:54 +00:00
|
|
|
from netforce.model import Model, fields
|
2014-10-15 06:36:52 +00:00
|
|
|
|
|
|
|
class Payment(Model):
|
|
|
|
_name="clinic.payment"
|
|
|
|
_transient=True
|
|
|
|
|
|
|
|
_fields={
|
2014-10-20 11:49:54 +00:00
|
|
|
'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"),
|
2014-10-15 06:36:52 +00:00
|
|
|
}
|
|
|
|
|
2014-10-21 06:57:38 +00:00
|
|
|
_defaults={
|
|
|
|
'amount': 0.0,
|
|
|
|
}
|
|
|
|
|
2014-10-15 06:36:52 +00:00
|
|
|
Payment.register()
|
2014-10-20 11:49:54 +00:00
|
|
|
|