23 lines
707 B
Python
23 lines
707 B
Python
|
from netforce.model import Model, fields
|
||
|
from netforce.access import get_active_company
|
||
|
|
||
|
class LaborCostLine(Model):
|
||
|
_name="clinic.labor.cost.line"
|
||
|
_string="Labor Cost Line"
|
||
|
_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"),
|
||
|
'qty': fields.Integer("Qty"),
|
||
|
'amount': fields.Float("Amount",scale=2),
|
||
|
'company_id': fields.Many2One('company','Company'),
|
||
|
}
|
||
|
|
||
|
_defaults={
|
||
|
"company_id": lambda *a: get_active_company(),
|
||
|
}
|
||
|
|
||
|
LaborCostLine.register()
|