- this.name = "%s.%s" % (filename, this.format)
- out = base64.encodestring(buf.getvalue())
- buf.close()
- self.write(cr, uid, ids, {'state': 'get',
- 'data': out,
- 'name':this.name}, context=context)
+ extension = this.format
+ if not lang and extension == 'po':
+ extension = 'pot'
+ name = "%s.%s" % (filename, extension)
+ this.write({ 'state': 'get', 'data': out, 'name': name })