Use the report name to create the temporary file to open it

This commit is contained in:
Cédric Krier
2009-06-22 10:54:13 +02:00
parent cb31d12b71
commit 4c31e5a994
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -1,3 +1,4 @@
* Use the report name to create the temporary file to open it
* Allow to store wizard size
* Add reset default on fields
* Store in config default width and height of main window
+4 -3
View File
@@ -50,11 +50,12 @@ class Action(object):
return False
if not res:
return False
(type, data, print_p) = res
(type, data, print_p, name) = res
if not print_p and direct_print:
print_p = True
(fileno, fp_name) = tempfile.mkstemp('.' + type, 'tryton_')
file_d = os.fdopen(fileno, 'wb+')
dtemp = tempfile.mkdtemp(prefix='tryton_')
fp_name = os.path.join(dtemp, name + '.' + type)
file_d = open(fp_name, 'w')
file_d.write(base64.decodestring(data))
file_d.close()
if email_print: