summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/mail_compose_message.py
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-05-17 07:46:54 +0000
committerNicolas Martinelli <nim@odoo.com>2019-05-17 07:46:54 +0000
commitc545783b95b15f65a9798003b614f75685dc434e (patch)
treec96f4edbea53759cdd2febfaef7ca93b01a61af3 /addons/mail/wizard/mail_compose_message.py
parent3cf9cfc985950c30c6b76480f77f5ffe53650b24 (diff)
[FIX] account: communication size
- Create 5 vendor bills with a long reference (> 1000 characters), for the same partner. - Select the bills and register a payment An error arise: 'psycopg2.OperationalError: index row size 3256 exceeds maximum 2712 for index "account_move_line_partner_id_ref_idx"'. As mentioned, the index row size limit is 2712 bytes, which is exceeded in that use case. Indeed, the reference of the payment is computed based on the vendor reference of all bills. We limit the number of characters to 2000. This seems reasonable knowing that UTF-8 characters use sequences of 1 to 4 bytes [1]. Characters with a code less than 128 require 1 byte only, and it is expected that most vendor references will only use these characters. It is indeed unlikely that special characters (such as Chinese characters, taking up to 4 bytes) are used for such references. [1] https://tools.ietf.org/html/rfc3629 opw-1998823 closes odoo/odoo#33457 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
0 files changed, 0 insertions, 0 deletions