diff options
| author | xmo-odoo <xmo@odoo.com> | 2017-10-30 16:18:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-30 16:18:04 +0100 |
| commit | 8e1ab164411deb81b89a690ef1d61770f3c0cb09 (patch) | |
| tree | 1a72ffdfee117674909f6c3755f1145fddc63e21 /odoo | |
| parent | e8dc72fd6941e9a9f2e2e5574ea7dee9c8431e4c (diff) | |
[FIX] core: mode of output file for t9n export
trans_export has been decided to use a *bytes* output buffer as some of
the output formats are text-ish (e.g. po) but others are definitely
binary content (e.g. XML). Therefore, when calling trans_export with a
*file*, it needs to be open in *binary mode*.
Fixes #20555
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/cli/server.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/cli/server.py b/odoo/cli/server.py index d740dc7282a..7c6ccd30b54 100644 --- a/odoo/cli/server.py +++ b/odoo/cli/server.py @@ -98,7 +98,7 @@ def export_translation(): fileformat = os.path.splitext(config["translate_out"])[-1][1:].lower() - with open(config["translate_out"], "w") as buf: + with open(config["translate_out"], "wb") as buf: registry = odoo.modules.registry.Registry.new(dbname) with odoo.api.Environment.manage(): with registry.cursor() as cr: |
