diff --git a/netforce_clinic/actions/clinic_hd_report.xml b/netforce_clinic/actions/clinic_hd_report.xml new file mode 100644 index 0000000..80a78f2 --- /dev/null +++ b/netforce_clinic/actions/clinic_hd_report.xml @@ -0,0 +1,8 @@ + + Report HD Case + report + clinic.hd.report + report_hd_report + hd_report + clinic_menu + diff --git a/netforce_clinic/layouts/clinic_hd_report.xml b/netforce_clinic/layouts/clinic_hd_report.xml new file mode 100644 index 0000000..36cfd2a --- /dev/null +++ b/netforce_clinic/layouts/clinic_hd_report.xml @@ -0,0 +1,4 @@ +
+ + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index a8b30a7..b5777e0 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -23,12 +23,14 @@ - + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 06e7774..dad4132 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -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 diff --git a/netforce_clinic/models/report_hd.py b/netforce_clinic/models/report_hd.py new file mode 100644 index 0000000..29e5755 --- /dev/null +++ b/netforce_clinic/models/report_hd.py @@ -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() diff --git a/netforce_clinic/templates/report_hd_report.hbs b/netforce_clinic/templates/report_hd_report.hbs new file mode 100644 index 0000000..7cf8355 --- /dev/null +++ b/netforce_clinic/templates/report_hd_report.hbs @@ -0,0 +1 @@ +

Cycle {{cycle}}