improve schedule

conv_bal
watcha.h 2015-03-16 07:51:28 +07:00
parent f6ff573d3a
commit 3f9379d562
3 changed files with 5 additions and 2 deletions

View File

@ -18,8 +18,8 @@
<list> <list>
<field name="cycle_id"/> <field name="cycle_id"/>
<field name="nurse_id" onchange="onchange_nurse" domain='[["department_id","=",parent.department_id]]'/> <field name="nurse_id" onchange="onchange_nurse" domain='[["department_id","=",parent.department_id]]'/>
<field name="level_id"/> <!--<field name="level_id"/>-->
<field name="state"/> <!--<field name="categ_id"/>-->
<field name="cycle_item_id" readonly="1"/> <field name="cycle_item_id" readonly="1"/>
<field name="note"/> <field name="note"/>
</list> </list>

View File

@ -176,11 +176,13 @@ class CycleItem(Model):
for line in obj.lines: for line in obj.lines:
nurse=line.nurse_id nurse=line.nurse_id
level=nurse.level_id level=nurse.level_id
categ=nurse.categ_id
lines.append(('create',{ lines.append(('create',{
'cycle_id': cycle.id, 'cycle_id': cycle.id,
'cycle_item_id': obj.id, 'cycle_item_id': obj.id,
'nurse_id': nurse.id, 'nurse_id': nurse.id,
'level_id': level.id , 'level_id': level.id ,
'categ_id': categ.id ,
'note': '', 'note': '',
})) }))
schedule_id=get_model('clinic.schedule').create({ schedule_id=get_model('clinic.schedule').create({

View File

@ -21,6 +21,7 @@ class ScheduleLine(Model):
'cycle_item_id': fields.Many2One("clinic.cycle.item","Cycle Item"), 'cycle_item_id': fields.Many2One("clinic.cycle.item","Cycle Item"),
"nurse_id": fields.Many2One("clinic.staff","Nurse",domain=[['type','=','nurse']]), "nurse_id": fields.Many2One("clinic.staff","Nurse",domain=[['type','=','nurse']]),
'level_id': fields.Many2One("clinic.staff.level","Level",function="_get_level"), 'level_id': fields.Many2One("clinic.staff.level","Level",function="_get_level"),
'categ_id': fields.Many2One("clinic.staff.categ","Category"),
'note': fields.Text("Note"), 'note': fields.Text("Note"),
"state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True), "state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True),
} }