~jfb-tempo-consulting/unifield-web/web39

« back to all changes in this revision

Viewing changes to addons/openerp/controllers/translator.py

  • Committer: jf
  • Date: 2021-06-16 14:29:42 UTC
  • Revision ID: jfb@tempo-consulting.fr-20210616142942-44yiau25ewe0dhfn
py3: save translation popup

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
                    rpc.session.execute('object', 'execute', 'ir.translation', 'write', [int(id)], {'value': val})
203
203
 
204
204
        # Encoding fields_value to prevent escaping characters and shorten sent data
205
 
        return dict(close_popup=True, fields_values=base64.b64encode(json.dumps(fields_values)))
 
205
        return dict(close_popup=True, fields_values=base64.b64encode(bytes(json.dumps(fields_values), 'utf8')))
206
206
 
207
207
# vim: ts=4 sts=4 sw=4 si et