[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 c545783b95, so is
the solution.
opw-2180139
closes odoo/odoo#43906
X-original-commit: dbd1858b623c5bf4c14c8de568c6addc7868b14e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user