clinic/netforce_clinic/models/cycle_dialy_line.py

27 lines
938 B
Python
Raw Normal View History

2014-11-21 16:11:57 +00:00
from netforce.model import Model, fields
from netforce.access import get_active_company
class CycleDialyLine(Model):
_name="clinic.cycle.dialy.line"
_string="Cycle Dialy Line"
_fields={
"cycle_dialy_id": fields.Many2One("clinic.cycle.dialy","Cycle Dialy"),
'cycle_id': fields.Many2One("clinic.cycle", "Cycle"),
'personal_id': fields.Many2One("clinic.personal", "Personal"),
2014-11-23 15:39:41 +00:00
'level_id': fields.Many2One("clinic.personal.level", "Level"),
'qty': fields.Integer("Qty"),
'rate': fields.Float("Rate"),
'amount': fields.Float("Amount"),
2014-11-21 16:11:57 +00:00
'company_id': fields.Many2One("company","Company"),
"type": fields.Selection([("doctor","Doctor"),('nurse','Nurse'),("personal","Personal")],"Type",required=True),
2014-11-24 04:00:58 +00:00
'date': fields.Date("Date"),
2014-11-21 16:11:57 +00:00
}
_defaults={
'company_id': lambda *a: get_active_company(),
}
CycleDialyLine.register()