Nicolas Martinelli c545783b95 [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>
2019-05-17 07:46:54 +00:00
…
2019-05-17 07:46:54 +00:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%