fixme 1 staff can have many department

conv_bal
watcha.h 2015-02-09 13:57:23 +07:00
parent ab9920aab5
commit dc8282afde
3 changed files with 28 additions and 23 deletions

View File

@ -4,7 +4,7 @@
<button string="Options" dropdown="1"> <button string="Options" dropdown="1">
<item string="Generate Visit" action="clinic_gen_visit"/> <item string="Generate Visit" action="clinic_gen_visit"/>
<item string="New Dialyzer" method="new_dialyzer"/> <item string="New Dialyzer" method="new_dialyzer"/>
<item string="Simple Address" method="simple_address" perm="clinic_simple_address"/> <item string="New Address" method="simple_address" perm="clinic_simple_address"/>
</button> </button>
</head> </head>
<field name="number"/> <field name="number"/>
@ -44,19 +44,6 @@
<field name="company_id" invisible="1"/> <field name="company_id" invisible="1"/>
</group> </group>
</tab> </tab>
<tab string="Cycles">
<group span="8" columns="1">
<field name="cycles" nolabel="1">
<list>
<field name="cycle_id"/>
<field name="day"/>
</list>
</field>
</group>
<group span="4" columns="1">
<field name="cycle_id"/>
</group>
</tab>
<tab string="Health Information"> <tab string="Health Information">
<field name="smoke"/> <field name="smoke"/>
<field name="withdrawal"/> <field name="withdrawal"/>
@ -72,6 +59,19 @@
<field name="who_transplantation"/> <field name="who_transplantation"/>
<field name="reason_of_chronic_renal_failure"/> <field name="reason_of_chronic_renal_failure"/>
</tab> </tab>
<tab string="Cycles">
<group span="8" columns="1">
<field name="cycles" nolabel="1">
<list>
<field name="cycle_id"/>
<field name="day"/>
</list>
</field>
</group>
<group span="4" columns="1">
<field name="cycle_id"/>
</group>
</tab>
<tab string="Cause Of Chronic Renal Failure"> <tab string="Cause Of Chronic Renal Failure">
<field name="causes" nolabel="1"> <field name="causes" nolabel="1">
<list> <list>
@ -100,18 +100,14 @@
</list> </list>
</field> </field>
</tab> </tab>
<tab string="Note"> <tab string="Other">
<group form_layout="stacked"> <group form_layout="stacked">
<field name="active" span="2"/> <field name="active" span="2"/>
<field name="rm_remain_visit" span="2" attrs='{"invisible":[["active","=","true"]]}'/> <field name="rm_remain_visit" span="2" attrs='{"invisible":[["active","=","true"]]}'/>
<field name="resign_date" span="2"/> <field name="resign_date" span="2"/>
<newline/>
<field name="note" nolabel="1"/>
</group>
</tab>
<tab string="Other">
<group form_layout="stacked">
<field name="hn_no" span="2"/> <field name="hn_no" span="2"/>
<newline/>
<field name="note"/>
</group> </group>
</tab> </tab>
</tabs> </tabs>

View File

@ -246,7 +246,9 @@ class Visit(Model):
# clear old nurse in cycle item # clear old nurse in cycle item
item_id=item_ids[0] item_id=item_ids[0]
item=item_obj.browse(item_id) item=item_obj.browse(item_id)
#FIXME problem 1 staff can have many department
user_id=get_active_user()
set_active_user(1)
# copy nurse from schedule(only draft) # copy nurse from schedule(only draft)
item=item_obj.browse(item_id) item=item_obj.browse(item_id)
if not item.lines and item.state=='draft': if not item.lines and item.state=='draft':
@ -277,7 +279,6 @@ class Visit(Model):
lines.append(('create', { lines.append(('create', {
'nurse_id': nr.id, 'nurse_id': nr.id,
'level_id': nr.level_id.id, 'level_id': nr.level_id.id,
#'state': nr.state,
'categ_id': nr.categ_id.id, 'categ_id': nr.categ_id.id,
})) }))
if lines: if lines:
@ -289,6 +290,8 @@ class Visit(Model):
obj.write({ obj.write({
'cycle_item_id': item_id, 'cycle_item_id': item_id,
}) })
#XXX
set_active_user(user_id)
hd_case=hd_case_obj.browse(hd_case_id) hd_case=hd_case_obj.browse(hd_case_id)
hd_case.write({ hd_case.write({

View File

@ -1,6 +1,12 @@
todo: todo:
- change profile
- Because of one user can access more than branch
- report doctor & nurse ***
-
- matching payment *** - matching payment ***
- script generate hd case - script generate hd case
- move between branch -> next phase
- patient
- sale medicine -> ok - sale medicine -> ok
- payment - payment
- accounting - accounting