Skip to content
Permalink
Browse files

fixes

  • Loading branch information...
mart-e committed Nov 8, 2019
1 parent 24885e8 commit 7829aa13eca36ebb147498942aefd383dff4a49c
Showing with 6 additions and 2 deletions.
  1. +6 −2 odoo/addons/base/models/res_lang.py
@@ -7,7 +7,6 @@
import logging
import os
import re
import shutil
import tarfile
import tempfile
from collections import defaultdict
@@ -199,7 +198,12 @@ def _read_po_from_attachment(self, addons, lang):
('name', '=', attachment_name)
], order="id asc"):

yield StringIO(base64.b64decode(po_file.datas).decode())
with tempfile.NamedTemporaryFile('wb+', delete=False) as buf:
buf.write(base64.b64decode(po_file.datas))

# now we determine the file format
buf.seek(0)
yield buf

@api.model
def _extract_po_to_attachment(self, addons, tmp, extracted_file):

0 comments on commit 7829aa1

Please sign in to comment.
You can’t perform that action at this time.