FIX Print wizard labor cost (check : period_id)
parent
b5e3900156
commit
43466e07f9
|
@ -48,6 +48,8 @@ class PrintLaborCost(Model):
|
||||||
date_to=defaults.get("date_to", self._get_date_to())
|
date_to=defaults.get("date_to", self._get_date_to())
|
||||||
print('defaults ', defaults)
|
print('defaults ', defaults)
|
||||||
yearnow=date_from.split("-")[0]
|
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 period in get_model('clinic.period').search_browse([['name','=',yearnow]]):
|
||||||
for line in period.lines:
|
for line in period.lines:
|
||||||
if line.state=='open':
|
if line.state=='open':
|
||||||
|
@ -96,6 +98,8 @@ class PrintLaborCost(Model):
|
||||||
dbname=get_active_db()
|
dbname=get_active_db()
|
||||||
fdir=os.path.join("static","db",dbname,"files")
|
fdir=os.path.join("static","db",dbname,"files")
|
||||||
tmp_dir='/tmp/wizard_lc'
|
tmp_dir='/tmp/wizard_lc'
|
||||||
|
print('majins',fdir)
|
||||||
|
print('majins',tmp_dir)
|
||||||
if not os.path.isdir(tmp_dir):
|
if not os.path.isdir(tmp_dir):
|
||||||
os.system("mkdir %s"%(tmp_dir))
|
os.system("mkdir %s"%(tmp_dir))
|
||||||
#Create File Name
|
#Create File Name
|
||||||
|
|
Loading…
Reference in New Issue