From 5095747ea4b464da61a067f2f5b4ed36d682ad89 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 2 Apr 2015 11:12:00 +0700 Subject: [PATCH] date from and date to not correspond from a link. --- .../models/report_labor_cost_summary.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/netforce_clinic/models/report_labor_cost_summary.py b/netforce_clinic/models/report_labor_cost_summary.py index 4849b98..4aa872e 100644 --- a/netforce_clinic/models/report_labor_cost_summary.py +++ b/netforce_clinic/models/report_labor_cost_summary.py @@ -33,8 +33,8 @@ class ReportLaborCostSummary(Model): def default_get(self,field_names=None,context={},**kw): defaults=context.get("defaults",{}) - date_from=defaults.get("date", self._get_date_from()) - date_to=defaults.get("date", self._get_date_to()) + date_from=defaults.get("date_from", self._get_date_from()) + date_to=defaults.get("date_to", self._get_date_to()) staff_type=defaults.get("staff_type","doctor") staff_id=int(defaults.get('staff_id', "0")) print('defaults ', defaults) @@ -49,12 +49,12 @@ class ReportLaborCostSummary(Model): return res def get_report_data(self,ids,context={}): - res=get_model("clinic.report.labor.cost.summary").default_get(context=context) - date_from=res['date_from'] - date_to=res['date_to'] - staff_id=res['staff_id'] - staff_type=res['staff_type'] - only_value=res['only_value'] + defaults=self.default_get(context=context) + date_from=defaults['date_from'] + date_to=defaults['date_to'] + staff_id=defaults['staff_id'] + staff_type=defaults['staff_type'] + only_value=defaults['only_value'] level_id=None categ_id=None branch_id=None