21 lines
623 B
Python
21 lines
623 B
Python
from netforce.model import Model, fields
|
|
from netforce.access import get_active_company
|
|
|
|
class LaborCostStaff(Model):
|
|
_name="clinic.labor.cost.staff"
|
|
_string="Labor Cost Staff"
|
|
_name_field="labor_cost_id"
|
|
|
|
_fields={
|
|
"labor_cost_id": fields.Many2One("clinic.labor.cost","Cycle Item",required=True),
|
|
'staff_id': fields.Many2One("clinic.staff", "Staff"),
|
|
'level_id': fields.Many2One("clinic.staff.level", "Level"),
|
|
'company_id': fields.Many2One('company','Company'),
|
|
}
|
|
|
|
_defaults={
|
|
"company_id": lambda *a: get_active_company(),
|
|
}
|
|
|
|
LaborCostStaff.register()
|