Files
odoo_source/addons/test_website/tests/__init__.py
T
Jeremy Kersten 521f7d36c1 [IMP] odoo: ignore unsupported args from controller
Before this commit, call a controller defined as:

```
@http.route('/route', type='http', auth='public')
def controller_func(self, foo):
do_it()
```

and called with url like /route?foo=1&bar=2

will crash with an exception:
`TypeError: controller_func() got an unexpected keyword argument 'bar'`

Now, we remove the extra parameters if the controller doesn't support it.
This case is not uncommon, you can easily arrive in this case with utm or
debug as extra parameter.

closes odoo/odoo#33962

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-06-08 13:53:57 +00:00

7 lines
215 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_controller_args
from . import test_reset_views
from . import test_views_during_module_operation