test report

conv_bal
chayut.s 2014-10-08 11:36:22 +07:00
parent 03780c2668
commit f451a92807
14 changed files with 117 additions and 46 deletions

View File

@ -0,0 +1,6 @@
<action>
<field name="type">report_odt</field>
<field name="model">clinic.visit</field>
<field name="method">get_visit_demo</field>
<field name="template">visit_demo</field>
</action>

View File

@ -0,0 +1,6 @@
<action>
<field name="string">Nationalities</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.round</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,6 @@
<action>
<field name="type">report_odt</field>
<field name="model">clinic.round</field>
<field name="method">get_data</field>
<field name="template">round</field>
</action>

View File

@ -0,0 +1,5 @@
<action>
<field name="type">report_odt2</field>
<field name="model">clinic.visit</field>
<field name="template">visit_form</field>
</action>

View File

@ -5,21 +5,17 @@
<item string="Journal Report" method="journal_report"/>
</button>
</head>
<group span="6" columns="1">
<field name="number"/>
<field name="date_start"/>
<field name="total_time"/>
<field name="department_id"/>
<field name="visit_id"/>
</group>
<group span="6" columns="1">
<field name="patient_id" onchange="onchange_patient"/>
<field name="date_stop"/>
<field name="doctor_id"/>
<field name="nurse_id"/>
</group>
<tabs>
<tab string="Dialyzer">
<separator string="Healthy Information"/>
<field name="wh_start"/>
<field name="wh_stop"/>
<field name="bp_start"/>
<field name="bp_stop"/>
<field name="per_bp_start"/>
<field name="per_bp_stop"/>
<field name="epo_tn"/>
<field name="epo_unit"/>
<field name="hct" onchange="onchange_htc"/>
<separator string="Dialyzer"/>
<field name="dialyzers" nolabel="1">
<list>
<field name="dialyzer_id"/>
@ -31,17 +27,9 @@
<field name="ultrafittration"/>
</list>
</field>
</tab>
<tab string="Healthy Information">
<field name="wh_start"/>
<field name="wh_stop"/>
<field name="bp_start"/>
<field name="per_bp_start"/>
<field name="bp_stop"/>
<field name="per_bp_stop"/>
<field name="hct"/>
</tab>
</tabs>
<!--<separator string="Choose Payment"/>
<field name="check_goverment_pay"/>
<field name="check_personal_pay"/>-->
<separator string="Others Payment"/>
<field name="lines" count="4" nolabel="1">
<list>
@ -53,13 +41,22 @@
<field name="amount"/>
</list>
</field>
<group span="4" columns="1">
<field name="fee"/>
<!--<field name="fee_type" onchange="onchange_fee_type"/>-->
<field name="fee_partner_id" domain="[['type','=','org']]" attrs='{"required":[["fee","!=",0]]}'/>
</group>
<separator string="Other Goverment"/>
<field name="lines" count="4" nolabel="1">
<list>
<field name="product_id" onchang="onchange_product"/>
<field name="description"/>
<field name="qty" onchange="onchange_line"/>
<field name="uom_id"/>
<field name="price" onchange="onchange_line"/>
<field name="amount"/>
</list>
</field>
<field name="fee" offset="7"/>
<field name="fee_partner_id" domain="[['type','=','org']]" attrs='{"required":[["fee","!=",0]]}' offset="7"/>
<group span="4" columns="1">
</group>
<separator string="HD Case Treatment Summary"/>
<group span="4" columns="1">
<field name="total"/>
<field name="amount"/>

View File

@ -9,7 +9,7 @@
<item string="Treatments" action="clinic_hd_case"/>
<item string="Dialyzer" action="clinic_dialyzer"/>
<item string="Reports">
<item string="Report1" action="report1"/>
<item string="Report1" action="report_clinic_round"/>
</item>
<item string="Config/Import">
<item string="Account (TB, Unpaid AP and AR)" action="report1"/>

View File

@ -1,7 +1,7 @@
<form model="clinic.visit" attrs='{"readonly":[["state","in",["cancelled","confirmed"]]]}' show_company="1">
<head>
<field name="state"/>
<button string="Print" icon="print" action="print_visit"/>
<button string="Print" icon="print" action="report_visit_form"/>
<button string="Options" dropdown="1">
<item string="Copy" method="copy"/>
</button>

View File

@ -18,3 +18,4 @@ from . import graduation
from . import nation
from . import race
from . import cause_chronic
from . import clinic_round

View File

@ -0,0 +1,27 @@
from netforce.model import Model, fields
class ClinicRound(Model):
_name="clinic.round"
_string="Round"
_fields={
"name": fields.Char("Name",required=True,search=True),
}
def get_data(self,context={}):
lines=[]
for i in range(10):
line={
'no': i,
'doctor': 'Doctor %s'%i,
#......
}
lines.append(line)
data={
'lines': lines,
}
print('data ', data)
return data
ClinicRound.register()

View File

@ -36,7 +36,11 @@ class HDcase(Model):
"per_bp_start": fields.Integer("/Per start"),
"bp_stop": fields.Integer("BP mmHG stop"),
"per_bp_stop": fields.Integer("/Per stop"),
"hct": fields.Integer("HCT %"),
"epo_tn" : fields.Char("EpoTn (Drug name)"),
"epo_unit" : fields.Integer("EpoUnit (Unit of Used drug)"),
"hct": fields.Integer("HCT %", required=True),
"check_goverment_pay" : fields.Boolean("The Government Pay"),
"check_personal_pay" : fields.Boolean("Pay yourself"),
"state": fields.Selection([("draft","Draft"),("confirmed","Confirmed"),("approved","Approved"),("cancelled","Cancelled"),("paid","Paid")],"Status",required=True),
"dialyzers": fields.One2Many("clinic.hd.case.dialyzer","hd_case_id","Dializers"),
"lines": fields.One2Many("clinic.hd.case.line","hd_case_id","Lines"),
@ -150,6 +154,13 @@ class HDcase(Model):
data['total']=total
return data
def onchange_htc(self,context={}):
data=context['htc']
total=0.0
if (htc > 39):
data['htc']=total
return data
def cancelled(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"cancelled"})

View File

@ -171,4 +171,15 @@ class Visit(Model):
}
def get_visit_demo(self,context={}):
if not context.get('number'):
return {}
visit_id=int(context['number'])
visit=self.browse(visit_id)
data={
'number' : visit.number
}
return data
Visit.register()

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
<h1>Hello HBS</h1>