diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-01-24 07:25:54 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-01-24 10:51:15 +0000 |
| commit | ec3a947f3bfdafbb211f3aae58aa7d5bc7e8e7a8 (patch) | |
| tree | 58f07cad31e634639ac8c022c08978da9379535c /addons | |
| parent | cfc088de1ec029405c748b11ee2b943b08e227bc (diff) | |
[FIX] sale: customer reference index
- Create hundreds of SO with a Customer Reference set
- Select them all
- Click on Action Create Invoices
The following error is raised:
```
psycopg2.OperationalError: index row size 5480 exceeds maximum 2712 for index "account_move_line_partner_id_ref_idx"
```
The issue is similar to c545783b95b15f65a9798003b614f75685dc434e, so is
the solution.
opw-2180139
closes odoo/odoo#43906
X-original-commit: dbd1858b623c5bf4c14c8de568c6addc7868b14e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale/models/sale.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 106e7a2e3f6..b1a1820d844 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -628,7 +628,7 @@ class SaleOrder(models.Model): payment_refs.add(invoice_vals['invoice_payment_ref']) refs.add(invoice_vals['ref']) ref_invoice_vals.update({ - 'ref': ', '.join(refs), + 'ref': ', '.join(refs)[:2000], 'invoice_origin': ', '.join(origins), 'invoice_payment_ref': len(payment_refs) == 1 and payment_refs.pop() or False, }) |
