conv_bal
watcha.h 2014-11-25 21:20:30 +07:00
parent 700cc56e18
commit 970aa12ac6
4 changed files with 20 additions and 9 deletions

View File

@ -37,10 +37,11 @@
<item string="Visit Board" action="clinic_visit_board"/>
<item string="Generate Visit" action="clinic_gen_visit_form"/>
</item>
<item string="HD Cases">
<item string="HD Cases" action="clinic_hd_case"/>
<item string="HD Case Dialy" action="clinic_hd_case_dialy"/>
</item>
<item string="HD Cases" action="clinic_hd_case"/>
<!--<item string="HD Cases">-->
<!--<item string="HD Cases" action="clinic_hd_case"/>-->
<!--<item string="HD Case Dialy" action="clinic_hd_case_dialy"/>-->
<!--</item>-->
<item string="Reports">
<header string="HD CASE"/>
<item string="HD Case Summary" action="clinic_report_hd_case_summary"/>

View File

@ -6,9 +6,9 @@
<field name="levels" nolabel="1">
<list>
<field name="level_id"/>
<field name="var_a"/>
<field name="op"/>
<field name="var_b"/>
<field name="var_a" onchange="onchange_line"/>
<field name="op" onchange="onchange_line"/>
<field name="var_b" onchange="onchange_line"/>
<field name="formular"/>
</list>
<form>

View File

@ -5,7 +5,7 @@ import xlrd
import xmltodict
from netforce.model import Model, fields, get_model
from netforce.utils import get_file_path
from netforce.utils import get_file_path, get_data_path
from netforce.access import get_active_company
class ClinicSetting(Model):
@ -279,4 +279,14 @@ class ClinicSetting(Model):
print("%s is completed"%hd_case.number)
count+=1
def onchange_line(self,context={}):
data=context['data']
path=context['path']
line=get_data_path(data,path,parent=True)
var_a=line['var_a'] or ''
var_b=line['var_b'] or ''
op=line['op'] or ''
line['formular']='%sX%s%s'%(var_a,op,var_b)
return data
ClinicSetting.register()

View File

@ -15,7 +15,7 @@ class StaffLevel(Model):
_defaults={
"company_id": lambda *a: get_active_company(),
'sequence': 0,
'type': 'staff',
'type': 'nurse',
}
_order="sequence"