Paul Morelle
authored
It may happen than the routing map is cleared while rendering a qweb view. For example, if an asset bundle is regenerated, the previous one is unlinked, which causes a cache clearing. Previously-generated EndPoint objects aren't found any more in the new routing map, so `request.endpoint` cannot be used any more after a cache clearing. This commit adds hash and comparison magic methods on http.EndPoint so that EndPoint objects created by a previous routing map generation can still be used after a cache clearing. Two tests were added: one to test the comparison and hash methods, and the other to test them in a real-case rendering. Commit 80a04f7e fixed this bug too, but introduced another issue which caused many OPW, so it was quickly reverted by deb23450 along with its performance improvement 33167b39. This commit replaces 80a04f7e with another way to fix the issue. A third test has been added in order to avoid reintroducing this other issue. By the way, this commit also removes the EndPoint.arguments attribute, as commit 17f19926 removed all usages of this attribute in Odoo 9.0, but left this initialization here. OPW-2834546 OPW-2834549 OPW-2834625 closes odoo/odoo#90745 X-original-commit: 21864908 Signed-off-by:Romain Derie (rde) <rde@odoo.com>
Name | Last commit | Last update |
---|---|---|
.. |