[FIX] base: import translation file

Correctly open file

Closes #21064
This commit is contained in:
Abdulmomen Kadum عبدالمؤمن كاظم
2017-12-11 10:09:17 +01:00
committed by Martin Trigaux
parent e521f43256
commit 15026b8a86
@@ -29,7 +29,7 @@ class BaseLanguageImport(models.TransientModel):
def import_lang(self):
this = self[0]
this = this.with_context(overwrite=this.overwrite)
with TemporaryFile('w+b') as buf:
with TemporaryFile('wb+') as buf:
try:
buf.write(base64.decodestring(this.data))