clinic/netforce_clinic/models/staff_rotation.py

25 lines
921 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"
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"),
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()