clinic/netforce_clinic/models/cycle_daily_line.py

27 lines
920 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
2014-11-27 00:47:38 +00:00
class CycleDailyLine(Model):
_name="clinic.cycle.daily.line"
_string="Cycle Daily Line"
2014-11-21 16:11:57 +00:00
_fields={
2014-11-27 00:47:38 +00:00
"cycle_daily_id": fields.Many2One("clinic.cycle.daily","Cycle Daily"),
2014-11-21 16:11:57 +00:00
'cycle_id': fields.Many2One("clinic.cycle", "Cycle"),
'staff_id': fields.Many2One("clinic.staff", "Staff"),
'level_id': fields.Many2One("clinic.staff.level", "Level"),
2014-11-23 15:39:41 +00:00
'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([('staff','Staff'),("doctor","Doctor"),('nurse','Nurse')],"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(),
}
2014-11-27 00:47:38 +00:00
CycleDailyLine.register()