diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-17 10:55:14 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-08-20 23:25:54 +0200 |
| commit | 508926d2b86b81ad2c37e038cbd97bebdacb77ab (patch) | |
| tree | 524fb0e75921b42b9bc524cd889452e4f266f7be /odoo/osv/expression.py | |
| parent | 23299189c45302f30930a2fc411ea85ae975d6b8 (diff) | |
[FIX] P3: hex() returns text, don't re-decode it
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 1f55f58600a..69833f45de0 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.encode('utf-8')))[2:].decode('utf-8') + alias_hash = hex(crc32(alias.encode('utf-8')))[2:] ALIAS_PREFIX_LENGTH = 63 - len(alias_hash) - 1 alias = "%s_%s" % ( alias[:ALIAS_PREFIX_LENGTH], alias_hash) |
