clinic/netforce_clinic/models/staff_rotation.py

27 lines
999 B
Python
Raw Normal View History

2014-11-05 05:06:43 +00:00
from netforce.model import Model, fields
2014-11-12 11:13:23 +00:00
from netforce.access import get_active_company
2014-11-05 05:06:43 +00:00
2014-11-25 15:22:50 +00:00
class StaffRotation(Model):
_name="clinic.staff.rotation"
_string="Staff Rotation"
2015-01-09 05:19:52 +00:00
_multi_company=True
2014-11-05 05:06:43 +00:00
_fields={
"staff_id": fields.Many2One("clinic.staff","Staff", search=True),
"level_id": fields.Many2One("clinic.staff.level","Staff Level", search=True),
2014-11-12 11:13:23 +00:00
"from_company_id": fields.Many2One("company", "From", search=True),
"to_company_id": fields.Many2One("company", "To", search=True),
"hire_date": fields.Date("Hire Date", search=True),
"resign_date": fields.Date("Resign Date", search=True),
2014-11-05 05:06:43 +00:00
"wage": fields.Float("Wage"),
2014-11-23 13:44:25 +00:00
"max_cycle": fields.Integer("Max Cycle"),
2015-02-18 08:50:35 +00:00
"ot_per_cycle": fields.Float("OT Per Cycle"),
2014-11-05 05:06:43 +00:00
"note": fields.Text("Note"),
2014-11-12 11:13:23 +00:00
'company_id': fields.Many2One("company","Company"),
}
_defaults={
"company_id": lambda *a: get_active_company(),
2014-11-05 05:06:43 +00:00
}
2014-11-25 15:22:50 +00:00
StaffRotation.register()