diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-15 17:27:24 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-08-20 23:25:54 +0200 |
| commit | 481a00dc4b82bc1b2cbbd6079a147fe230ac57bd (patch) | |
| tree | 975b178f4e4a3733b904bd511d905160014ec009 /odoo/osv/expression.py | |
| parent | 9d83784f1df18306b6166fd92a0573f39bf6262d (diff) | |
[FIX] P3: hash/hmac payload must be bytes
Diffstat (limited to 'odoo/osv/expression.py')
| -rw-r--r-- | odoo/osv/expression.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/osv/expression.py b/odoo/osv/expression.py index 761b9bef4fe..1f55f58600a 100644 --- a/odoo/osv/expression.py +++ b/odoo/osv/expression.py @@ -337,7 +337,7 @@ def generate_table_alias(src_table_alias, joined_tables=[]): # We have to fit a crc32 hash and one underscore # into a 63 character alias. The remaining space we can use to add # a human readable prefix. - alias_hash = hex(crc32(alias))[2:] + alias_hash = hex(crc32(alias.encode('utf-8')))[2:].decode('utf-8') ALIAS_PREFIX_LENGTH = 63 - len(alias_hash) - 1 alias = "%s_%s" % ( alias[:ALIAS_PREFIX_LENGTH], alias_hash) |
