2014-10-02 19:12:52 +00:00
|
|
|
from netforce.model import Model, fields
|
2014-08-21 07:29:37 +00:00
|
|
|
|
|
|
|
class Hdcaseline(Model):
|
|
|
|
_name="clinic.hd.case.line"
|
|
|
|
_fields={
|
2015-01-11 11:23:28 +00:00
|
|
|
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case",required=True,on_delete="cascade"),
|
2015-01-15 05:15:46 +00:00
|
|
|
"hd_case_dis_id": fields.Many2One("clinic.hd.case.popup.discontinue","HD Case",on_delete="cascade"),
|
2014-10-02 19:12:52 +00:00
|
|
|
"product_id": fields.Many2One("product","Product",search=True),
|
2014-10-03 02:00:47 +00:00
|
|
|
"description": fields.Char("Description",search=True),
|
2014-10-02 19:12:52 +00:00
|
|
|
"qty":fields.Integer("QTY"),
|
|
|
|
"uom_id": fields.Many2One("uom","UOM",required=True,search=True),
|
|
|
|
"price":fields.Float("Price"),
|
2014-10-03 02:00:47 +00:00
|
|
|
"amount":fields.Float("Amount"),
|
2014-12-14 11:15:14 +00:00
|
|
|
"type": fields.Selection([("fee","Fee"),('medicine','Medicine'),('service','Service'),("others","Others")],"Type",required=True),
|
2014-12-20 18:55:26 +00:00
|
|
|
"product_categ_id": fields.Many2One("product.categ","Category",domain=[['expense','=',True]]),
|
|
|
|
'reimbursable': fields.Selection([['yes','Yes'],['no','No']],"Reimbursable"),
|
2014-12-21 10:11:22 +00:00
|
|
|
'state': fields.Selection([['draft','Draft'],['done','Done']],"State"),
|
2015-01-09 05:19:52 +00:00
|
|
|
"account_id": fields.Many2One("account.account","Account"),
|
2014-10-22 08:55:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_defaults={
|
2014-11-26 11:22:17 +00:00
|
|
|
'type': 'others',
|
2014-12-21 02:54:45 +00:00
|
|
|
'reimbursable': 'no',
|
2014-12-21 10:11:22 +00:00
|
|
|
'state': 'draft',
|
2014-08-21 07:29:37 +00:00
|
|
|
}
|
2014-10-02 19:12:52 +00:00
|
|
|
|
2014-08-21 07:29:37 +00:00
|
|
|
Hdcaseline.register()
|
|
|
|
|