Too many "invoice_line_ids" for one invoice : HTTP request too long
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
Medium
|
OpenERP R&D Web Team | ||
5.0 |
Won't Fix
|
Undecided
|
Unassigned | ||
Trunk |
Fix Released
|
Medium
|
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_
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.
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).
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 (http:// httpd.apache. org/docs/ 2.2/mod/ core.html# limitrequestlin e); by default is 8KB, it worked for us setting it to 16KB.