From dc8282afded5f2acba1011d14ae572b0fcb805d2 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Mon, 9 Feb 2015 13:57:23 +0700 Subject: [PATCH] fixme 1 staff can have many department --- .../layouts/clinic_patient_form.xml | 38 +++++++++---------- netforce_clinic/models/visit.py | 7 +++- netforce_clinic/todo.txt | 6 +++ 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml index 78fbe8a..4e80d8e 100644 --- a/netforce_clinic/layouts/clinic_patient_form.xml +++ b/netforce_clinic/layouts/clinic_patient_form.xml @@ -4,7 +4,7 @@ @@ -44,19 +44,6 @@ - - - - - - - - - - - - - @@ -72,6 +59,19 @@ + + + + + + + + + + + + + @@ -100,18 +100,14 @@ - + - - - - - - + + diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index 0ea6ef0..f9d6074 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -246,7 +246,9 @@ class Visit(Model): # clear old nurse in cycle item item_id=item_ids[0] 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) item=item_obj.browse(item_id) if not item.lines and item.state=='draft': @@ -277,7 +279,6 @@ class Visit(Model): lines.append(('create', { 'nurse_id': nr.id, 'level_id': nr.level_id.id, - #'state': nr.state, 'categ_id': nr.categ_id.id, })) if lines: @@ -289,6 +290,8 @@ class Visit(Model): obj.write({ 'cycle_item_id': item_id, }) + #XXX + set_active_user(user_id) hd_case=hd_case_obj.browse(hd_case_id) hd_case.write({ diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index ba498bd..24f2b35 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -1,6 +1,12 @@ todo: + - change profile + - Because of one user can access more than branch + - report doctor & nurse *** + - - matching payment *** - script generate hd case + - move between branch -> next phase + - patient - sale medicine -> ok - payment - accounting