25 lines
947 B
Python
25 lines
947 B
Python
from netforce.model import Model, fields
|
|
from netforce.access import get_active_company
|
|
|
|
class PersonalMove(Model):
|
|
_name="clinic.personal.move"
|
|
_string="Personal Move"
|
|
|
|
_fields={
|
|
"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),
|
|
"wage": fields.Float("Wage"),
|
|
"max_cycle": fields.Integer("Max Cycle"),
|
|
"note": fields.Text("Note"),
|
|
'company_id': fields.Many2One("company","Company"),
|
|
}
|
|
_defaults={
|
|
"company_id": lambda *a: get_active_company(),
|
|
}
|
|
|
|
PersonalMove.register()
|