improve schedule
parent
f6ff573d3a
commit
3f9379d562
|
@ -18,8 +18,8 @@
|
|||
<list>
|
||||
<field name="cycle_id"/>
|
||||
<field name="nurse_id" onchange="onchange_nurse" domain='[["department_id","=",parent.department_id]]'/>
|
||||
<field name="level_id"/>
|
||||
<field name="state"/>
|
||||
<!--<field name="level_id"/>-->
|
||||
<!--<field name="categ_id"/>-->
|
||||
<field name="cycle_item_id" readonly="1"/>
|
||||
<field name="note"/>
|
||||
</list>
|
||||
|
|
|
@ -176,11 +176,13 @@ class CycleItem(Model):
|
|||
for line in obj.lines:
|
||||
nurse=line.nurse_id
|
||||
level=nurse.level_id
|
||||
categ=nurse.categ_id
|
||||
lines.append(('create',{
|
||||
'cycle_id': cycle.id,
|
||||
'cycle_item_id': obj.id,
|
||||
'nurse_id': nurse.id,
|
||||
'level_id': level.id ,
|
||||
'categ_id': categ.id ,
|
||||
'note': '',
|
||||
}))
|
||||
schedule_id=get_model('clinic.schedule').create({
|
||||
|
|
|
@ -21,6 +21,7 @@ class ScheduleLine(Model):
|
|||
'cycle_item_id': fields.Many2One("clinic.cycle.item","Cycle Item"),
|
||||
"nurse_id": fields.Many2One("clinic.staff","Nurse",domain=[['type','=','nurse']]),
|
||||
'level_id': fields.Many2One("clinic.staff.level","Level",function="_get_level"),
|
||||
'categ_id': fields.Many2One("clinic.staff.categ","Category"),
|
||||
'note': fields.Text("Note"),
|
||||
"state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue