basic report template
parent
b9264098d3
commit
5aee7a60b5
|
@ -0,0 +1,8 @@
|
|||
<action>
|
||||
<field name="string">Report HD Case</field>
|
||||
<field name="view_cls">report</field>
|
||||
<field name="model">clinic.hd.report</field>
|
||||
<field name="report_template">report_hd_report</field>
|
||||
<field name="report_template_xls">hd_report</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -0,0 +1,4 @@
|
|||
<form model="clinic.hd.report">
|
||||
<field name="cycle"/>
|
||||
<field name="date"/>
|
||||
</form>
|
|
@ -23,12 +23,14 @@
|
|||
<!--<item string="Visit" action="clinic_visit"/>-->
|
||||
<!--</item>-->
|
||||
<item string="Reports">
|
||||
<item string="Clinic Round(Testing)" action="report_clinic_round"/>
|
||||
<item string="Treatment Report" action="clinic_hd_report"/>
|
||||
<item string="Clinic Round(Testing)" action="clinic_round_report"/>
|
||||
</item>
|
||||
<item string="Imports">
|
||||
<item string="Import Payments" action="clinic_import_payment"/>
|
||||
</item>
|
||||
<item string="Settings">
|
||||
<item string="Round" action="clinic_round"/>
|
||||
<item string="Departments" action="clinic_department"/>
|
||||
<item string="Clinic Settings" action="clinic_setting"/>
|
||||
</item>
|
||||
|
|
|
@ -17,6 +17,9 @@ from . import doctor
|
|||
from . import nurse
|
||||
from . import visit
|
||||
from . import visit_plan
|
||||
from . import clinic_round
|
||||
from . import clinic_round_report
|
||||
from . import report_hd
|
||||
from . import hd_case
|
||||
from . import hd_case_line
|
||||
from . import hd_case_discont
|
||||
|
@ -28,7 +31,6 @@ from . import graduation
|
|||
from . import nation
|
||||
from . import race
|
||||
from . import cause_chronic
|
||||
from . import clinic_round
|
||||
from . import dialyzer_line
|
||||
from . import import_payment
|
||||
from . import file_sheet
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
import time
|
||||
|
||||
from netforce.model import Model, fields
|
||||
|
||||
class HDReport(Model):
|
||||
_name="clinic.hd.report"
|
||||
_string="HD Report"
|
||||
_transient=True
|
||||
|
||||
_fields={
|
||||
"date": fields.Date("Date"),
|
||||
"cycle": fields.Selection([("1","One"),("2","Two"),("3","Three"),("4","Four")],"Cycle"),
|
||||
}
|
||||
|
||||
_defaults={
|
||||
'date': lambda *a: time.strftime("%Y-%m-%d"),
|
||||
}
|
||||
|
||||
def get_report_data(self,ids,context={}):
|
||||
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>.")
|
||||
if not ids:
|
||||
return {}
|
||||
obj=self.browse(ids)[0]
|
||||
#get_model('clinic.patient').search
|
||||
data={
|
||||
'cycle': obj.cycle or "Empty Cyle"
|
||||
}
|
||||
return data
|
||||
|
||||
HDReport.register()
|
|
@ -0,0 +1 @@
|
|||
<h1 style="color: red">Cycle {{cycle}}</h1>
|
Loading…
Reference in New Issue