add permission

conv_bal
watcha.h@almacom.co.th 2015-01-11 12:29:32 +07:00
parent 039c884bf6
commit 4f1e1cd693
8 changed files with 24 additions and 22 deletions

View File

@ -22,7 +22,7 @@
</tab>
<tab string="Validation">
<field name="user_id" span="3"/>
<button string="Validate" type="success" method="validate" icon="ok" size="small" states="draft" />
<button string="Validate" perm="clinic_cycle_item_validate" type="success" method="validate" icon="ok" size="small" states="draft" />
</tab>
</tabs>
<related>

View File

@ -117,12 +117,11 @@
</tab>
</tabs>
<foot>
<button string="Start" type="success" icon="arrow-right" method="do_treatment" states="draft,waiting_treatment"/>
<button string="Done" type="success" icon="ok" method="done" states="in_progress"/>
<button string="Discard" type="danger" icon="remove" action="clinic_hd_case_distcont" states="in_progress"/>
<button string="Claim Expense" type="default" icon="arrow-right" states="completed" method="request_fee" attrs='{"invisible":[["req_fee","=",1]]}'/>
<!--<button string="Pay" type="success" icon="ok" method="pay" states="completed" attrs='{"invisible":[["req_fee","=",0]]}'/>-->
<button string="Pay" type="success" icon="ok" method="pay" states="completed,waiting_payment" attrs='{"invisible":[["req_fee","=",0]]}'/>
<button string="Start" type="success" perm="clinic_hdcase_start" icon="arrow-right" method="do_treatment" states="draft,waiting_treatment"/>
<button string="Done" type="success" perm="clinic_hdcase_done" icon="ok" method="done" states="in_progress"/>
<button string="Discard" type="danger" perm="clinic_hdcase_discard" icon="remove" action="clinic_hd_case_distcont" states="in_progress"/>
<button string="Claim Expense" type="default" perm="clinic_hdcase_claim" icon="arrow-right" states="completed" method="request_fee" attrs='{"invisible":[["req_fee","=",1]]}'/>
<button string="Pay" type="success" perm="clinic_hdcase_pay" icon="ok" method="pay" states="completed,waiting_payment" attrs='{"invisible":[["req_fee","=",0]]}'/>
</foot>
<related>
<field name="invoices" click_action="view_invoice">

View File

@ -1,6 +1,6 @@
<menu string="Clinic">
<menu string="Clinic" perm="clinic">
<item string="Dashboard" action="clinic_board"/>
<item string="Staffs">
<item string="Staffs" perm="clinic_staff">
<item string="Staffs" action="clinic_staff"/>
<item string="Doctors" action="clinic_staff" action_options="tab_no=2"/>
<item string="Nurses" action="clinic_staff" action_options="tab_no=3"/>
@ -12,7 +12,7 @@
<item string="Levels" action="clinic_staff_level"/>
<item string="Categories" action="clinic_staff_categ"/>
</item>
<item string="Patients">
<item string="Patients" perm="clinic_patient">
<item string="Patients" action="clinic_patient"/>
<item string="Dialyzers" action="clinic_dialyzer"/>
<divider/>
@ -25,31 +25,31 @@
<item string="Races" action="clinic_race"/>
<item string="Morbidities" action="clinic_morbidity"/>
</item>
<item string="Cycles">
<item string="Cycles" perm="clinic_cycle">
<item string="Cycles" action="clinic_cycle"/>
<item string="Cycle Items" action="clinic_cycle_item"/>
</item>
<item string="Schedules" action="clinic_schedule">
<item string="Schedules" action="clinic_schedule" perm="clinic_schedule">
<item string="Schedules" action="clinic_schedule"/>
<item string="Schedules Board" action="clinic_schedule_board"/>
</item>
<item string="Visits">
<item string="Visits" perm="clinic_visit">
<item string="Visits" action="clinic_visit"/>
<item string="Visit Board" action="clinic_visit_board"/>
</item>
<item string="HD Cases">
<item string="HD Cases" perm="clinic_hdcase">
<item string="HD Cases" action="clinic_hd_case"/>
<divider/>
<header string="OTHERS"/>
<item string="Sickbed" action="clinic_sickbed"/>
</item>
<item string="Reports">
<item string="Reports" perm="clinic_report">
<item string="HD Case Summary" action="clinic_report_hd_case_summary"/>
<item string="Medical Summary" action="clinic_report_medical_summary"/>
<item string="Recent Patient" action="clinic_report_recent_patient"/>
<item string="Discontinue Patient" action="clinic_report_discontinue_patient"/>
</item>
<item string="Settings">
<item string="Settings" perm="clinic_settings">
<item string="Branch" action="clinic_branch"/>
<item string="Departments" action="clinic_department"/>
<item string="Hospital" action="clinic_hospital"/>

View File

@ -1,4 +1,4 @@
<calendar model="clinic.visit" states='draft' start_field="time_start" end_field="time_stop" colors='{"#F1B2E1":[["cycle_color","=","#F1B2E1"]],"#B1DDF3":[["cycle_color","=","#B1DDF3"]],"#FFDE89":[["cycle_color","=","#FFDE89"]],"#E3675C":[["cycle_color","=","#E3675C"]]}'>
<calendar model="clinic.visit" states='draft' color_field="cycle_color" date_field="visit_date" start_field="time_start" end_field="time_stop" colors='{"#F1B2E1":[["cycle_color","=","#F1B2E1"]],"#B1DDF3":[["cycle_color","=","#B1DDF3"]],"#FFDE89":[["cycle_color","=","#FFDE89"]],"#E3675C":[["cycle_color","=","#E3675C"]]}'>
<field name="patient_id"/>
<field name="cycle_id"/>
<field name="number"/>

View File

@ -32,9 +32,9 @@
</tab>
</tabs>
<foot>
<button string="Pending" type="default" method="pending" states="draft" />
<button string="Confirm" type="success" method="confirm" states="pending" />
<button string="Discard" type="danger" method="cancel" states="pending" />
<button string="Pending" perm="clinic_visit_pending" type="default" method="pending" states="draft" />
<button string="Confirm" perm="clinic_visit_confirm" type="success" method="confirm" states="pending" />
<button string="Discard" perm="clinic_visit_discard" type="danger" method="cancel" states="pending" />
</foot>
<related>
<field name="hd_cases" readonly="1"/>

View File

@ -153,6 +153,7 @@ class GenVisit(Model):
'id': nurse.id,
'level_id': nurse.level_id.id,
})
#XXX
if not nurse_vals:
for nurse in get_model("clinic.staff").search_browse([['type','=','nurse'],['categ_id','=',obj.nurse_categ_id.id]]):
nurse_vals.append({

View File

@ -129,7 +129,7 @@ class VisitBoard(Model):
number='*รอการยืนยัน'
cycle=visit.cycle_id
patient=visit.patient_id
hn_name=patient.hn or '-'
hn_name=patient.hn_no or '-'
visit_date=visit.visit_date
if visit.state=='cancelled':

View File

@ -1,8 +1,10 @@
=====
- access right
- fix bug
- schedule
- calendar
- schedule
- import
=====
create button reset at setting
- backup master data