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={
|
|
|
|
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,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-10-22 08:55:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_defaults={
|
2014-11-26 11:22:17 +00:00
|
|
|
'type': 'others',
|
2014-12-20 18:55:26 +00:00
|
|
|
'reimbursable': False,
|
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()
|
|
|
|
|