c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #00317
[Bug 519720] Re: Too many "invoice_line_ids" for one invoice : HTTP request too long
Hello,
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.
** Patch added: "context.patch"
https://bugs.launchpad.net/openobject-client-web/+bug/519720/+attachment/1694610/+files/context.patch
--
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 C2C
OERPScenario, which is subscribed to OpenERP OpenObject.
Status in OpenObject Web Client: Fix Committed
Status in OpenObject Web Client 5.0 series: New
Status in OpenObject Web Client trunk series: Fix Committed
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).