[IMP]: store temp file

bzr revid: ksa@tinyerp.co.in-20110419065302-10f2phdpq0xtok94
This commit is contained in:
ksa (Open ERP) 2011-04-19 12:23:02 +05:30
parent 01f64ad6ed
commit a576a5601b
2 changed files with 5 additions and 4 deletions

View File

@ -203,6 +203,7 @@
<field name="rml_footer1" colspan="4"/>
<field name="rml_footer2" colspan="4"/>
<field name="currency_id" colspan="2"/>
<button name="createReport" string="Preview Report" type="object" icon="gtk-print"/>
</page>
<page string="Header/Footer" groups="base.group_extended">
<field colspan="4" name="rml_header" nolabel="1"/>

View File

@ -144,7 +144,7 @@ class res_company(osv.osv):
return []
ids = self.search(cr, uid, [('parent_id','child_of',[company])])
return ids
# For Report
def createReport(cr, uid, report, ids, name=False):
@ -160,9 +160,9 @@ class res_company(osv.osv):
fp = open(report_file,'wb+')
fp.write(result);
fp.close();
files += [report_file]
files += [report_file]
except Exception,e:
continue
continue
return files
def _get_partner_hierarchy(self, cr, uid, company_id, context={}):
@ -319,7 +319,7 @@ class res_company(osv.osv):
</template>
</document>
"""
tempfilename= os.tempnam()
tempfilename= '/tmp/previews.rml'
fp = open(tempfilename, 'wb+')
fp.write(header_xml)
fp.close()