diff --git a/netforce_clinic/models/print_wizard_labor_cost.py b/netforce_clinic/models/print_wizard_labor_cost.py index 0ccc0c0..280d65f 100644 --- a/netforce_clinic/models/print_wizard_labor_cost.py +++ b/netforce_clinic/models/print_wizard_labor_cost.py @@ -48,6 +48,8 @@ class PrintLaborCost(Model): date_to=defaults.get("date_to", self._get_date_to()) print('defaults ', defaults) yearnow=date_from.split("-")[0] + if len(get_model('clinic.period').search_browse([['name','=',yearnow]]))==0: + period_id=None for period in get_model('clinic.period').search_browse([['name','=',yearnow]]): for line in period.lines: if line.state=='open': @@ -96,6 +98,8 @@ class PrintLaborCost(Model): dbname=get_active_db() fdir=os.path.join("static","db",dbname,"files") tmp_dir='/tmp/wizard_lc' + print('majins',fdir) + print('majins',tmp_dir) if not os.path.isdir(tmp_dir): os.system("mkdir %s"%(tmp_dir)) #Create File Name