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
|
|
|
|
|
|
|
class PersonalMove(Model):
|
|
|
|
_name="clinic.personal.move"
|
|
|
|
_string="Personal Move"
|
|
|
|
|
|
|
|
_fields={
|
2014-11-12 11:13:23 +00:00
|
|
|
"personal_id": fields.Many2One("clinic.personal","Personal (Doctor/Nurse)", search=True),
|
|
|
|
"level_id": fields.Many2One("clinic.personal.level","Personal Level", search=True),
|
|
|
|
"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"),
|
|
|
|
"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
|
|
|
}
|
|
|
|
|
|
|
|
PersonalMove.register()
|