← Back to team overview

openerp-dev-web team mailing list archive

[Bug 519720] [NEW] Too many "invoice_line_ids" for one invoice : HTTP request too long

 

You have been assigned a bug task for a public bug by Jay (OpenERP) (jvo-openerp):

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: openobject-client-web
     Importance: Undecided
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

** Affects: openobject-client-web/5.0
     Importance: Undecided
         Status: New

** Affects: openobject-client-web/trunk
     Importance: Undecided
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

-- 
Too many "invoice_line_ids" for one invoice : HTTP request too long
https://bugs.launchpad.net/bugs/519720
You received this bug notification because you are a member of OpenERP SA's Web Client R&D, which is a bug assignee.