Werkzeug 0.9.x fails on print button
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
When using latest revision of openerp-web from branch 7.0 with latest revision from openerp-server from branch 7.0 there is no version cap on werkzeug.
Since Werkzeug released a new version on june 13th (and 14th) there is an issue in the print button of any report.
It seems that openerp tries to set a cookie by passing an integer value and Werkzeug refuses the value and raises an exception:
2013-07-10 12:28:47,744 8840 ERROR demo1 openerp.
Traceback (most recent call last):
File "/home/
r = method(self, **self.params)
File "/home/
cookies=
File "/home/
response.
File "/home/
self.charset))
File "/home/
value = to_bytes(value, charset)
File "/home/
raise TypeError('Expected bytes')
TypeError: Expected bytes
This error does not occur if using Werkzeug 0.8.3 but occurs if using Werkzeug 0.9 and 0.9.1.
Removing all int() casts in openerp-
2013-07-10 12:38:10,090 9116 ERROR ? openerp.
Traceback (most recent call last):
File "/home/
r = method(self, **self.params)
TypeError: index() takes exactly 4 arguments (2 given)
The easiest solution to fix this for the moment is to require "werkzeug<0.9" in the setup.py of openobject-server (avoids future install issues) and mannually downgrade werkzeug to the last know working version (0.8.3) on all servers installed after June 13th 2013
To reproduce this install a FRESH version of openerp (web+server) that will pull its dependencies from internet and verify that you obtained a werkzeug > 0.8.3
Then intall the purchase module in any database. Then create a purchase order and try to click the print button. You should get the same traceback
Hi Florent, marking your bug as a duplicate. We arrived at the same fix as yours, but did not come across additional problems yet. It sounds self defeating, but if you have additional hints about the unclear conditions under which the problem persists, please put them on the original bug report.