Too many "invoice_line_ids" for one invoice : HTTP request too long

Bug #519720 reported by Alexandre ( on 2010-02-10
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
OpenERP R&D Web Team
OpenERP R&D Web Team

Bug Description

I use latest trunk version of the web-client (revno 2811) and of openerp-server (revno 1968)

After creating a new database, I create two draft invoices :
- first invoice "Invoice1" contains two invoice lines : 1 PC1 and 1 PC2
- second invoice "Invoice2" contains two invoice lines : 1 PC3 and 1 MB1
(PC1, PC2, PC3 and MB1 are products code for the invoice lines items).

In database, I get :
ID (invoice_line) INVOICE_ID
1 1 (Invoice1)
2 1 (Invoice1)
3 2 (Invoice2)
4 2 (Invoice2)

Up to now, it's OK.

Now, I open "Invoice1" and open the view "Invoice Line" by clicking on the first invoice line.
In the HTML code of the "invoice line" view, I get :
<input type="hidden" id="invoice_line/_terp_ids" name="invoice_line/_terp_ids" value="[1, 2, 3, 4]"/>

All invoice lines are here ! (allthough many lines don't belong to the current invoice !).
Then, by clicking on the "account" search help (magnifyng glass), all these invoice_line_ids are transmitted in a HTTP GET request, in an active_ids request parameter. This leads to a much-too-bigger HTTP GET request.

On a production base, with many invoices, and even more invoice lines, I currently get this :
Request-URI Too Large
The requested URL's length exceeds the capacity limit for this server.
Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.4 with Suhosin-Patch Server at <SERVER_NAME> Port <PORT>

That looks serious : from a certain number of invoice lines, it is not possible anymore to display, and modify the invoice lines !
Why are all invoice lines IDs transmitted ?

Attached file : the too-long request (look at "active_ids" parameter).

affects: account-banking → openobject-client-web

We recently had to configure Apache (we use an Apache proxy to secure, via HTTPS, the connection) to allow bigger HTTP request lines, as OpenERP was using URLs way longer than 8KB (WTF!).

Maybe this bug was one of the causes of the problem.

As a workaround, the directive to set the max HTTP request line size on Apache is LimitRequestLine (; by default is 8KB, it worked for us setting it to 16KB.

Our requests are currently weighing 18 kilobytes, and they'll keep growing (the size of the requests looks to depend on the increasing number of invoice lines).

We can't increase the Apache request size limit forever ! (How will we treat 100kb requests ?).

The fact that all the invoice lines of the database appears on a "Invoice" is not normal to me : we should only get the invoice lines related to the displayed invoice !

Omar (Pexego) (omar7r) wrote :


I bring some more information.

Supermanu35 (zephir35) wrote :

Hi !

I have one line in one2many list but all ids of table are included in the hidden field.
I have more than 130 000 lines on table, so the request is very very long (1mb), and require 2 or 3 minutes when we create or modify a line.

Any solution ?

(excuse my bad english, i'm french :-p )

Sananaz (Open ERP) (sma-tiny) wrote :


We have fixed the problem in lp:~openerp-dev/openobject-client-web/trunk-dev-web.
It will be merge with Trunk webclient branch soon so you can update your code.


Changed in openobject-client-web:
status: New → Fix Committed
Omar (Pexego) (omar7r) wrote :

Hi sma,

You can patch stable version too, please. It's a great and waited fix.


As an update, somebody reported that on some systems this bug may lead to segmentation faults on the web client: see bug 600792

summary: - Too many "invoice_line_ids" for one invoice : HTTP GET request too long
+ Too many "invoice_line_ids" for one invoice : HTTP request too long

Seems that this problem is getting popular on 5.0, see bug 612501

sma, would it be posible to backport the fix from the 6.0 to the 5.0? What kind of fix was it?

Any progress on this bug for 5.0 web client?

I just replied a related question: "Request-URI Too Large"

Plus there are at least three duplicates of this bug for 5.0, so I think this is still a hot bug on 5.0 implantations.

I wonder if it is not fixable on 5.0, or just nobody took care to backport the fix...

sma, please, could you give us some feedback on what changes where done on the 6.0 to fix this?

ksh (Axelor) (ksh-axelor) wrote :


   I found two issues in above posts:
   1. long-url.
   2. All record ids in hidden field in case of one2many pop-ups.

   I have tried to Fix these issues and attaching patch for the same.
   To test, Apply this patch on web-client5.0 revision number: 2943

   Please let us know the result if this patch fix the bugs correctly, so that it can be committed on branch.

Navrang Oza (noz-tiny) wrote :

Hello Borja López Soilán,

Can you please check is this patch is working fine for you ?
Please let us know the status from your side.


Julian Robbins (joolsr) wrote :
Download full text (15.7 KiB)


I've noticed thsi same error on other sections of 6.0 trunk ie

If I click on a Product and then clcik on the Right hand Side bar for 'Product Sales' I get the following related error

'Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server.
Apache/2.2.14 (Ubuntu) Server at openerp Port 80'

I have seen this error in other parts of the web client running 6.0 trunk too unfortunately, so pls can you check whether its fixed everywhere in web client ?

The url it tries to parse is (wait for it) :-


Carlos Ch. (solracch) wrote :

the bug is reappearing...
no solution yet?


Navrang Oza (noz-tiny) wrote :

Hello Julian Robbins,

I have performed following steps as you said,

- Clicked on Product,
- Opened Right hand side bar.
- Clicked on "Product Sales" from Links.

I didnt get any error.

This bug has been fixed in trunk.
Please update your code and check it once.


Julian Robbins (joolsr) wrote :

It appears that with 6.0 RC2, if I

Clicked on Product,
- Opened Right hand side bar.
- Clicked on "Product Sales" from Links.

I don't get any errors now.

But I'm still not totally convinced that this whole problem of overtly long urls causing apache/browser issues has gone away.

e.g. the no of chars in the URL for this request above is 4775 ... not exactly small is it ?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions