Creating the website menu link realestate/featured throws the following error:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 273, in _handle_exception
response = super(Http, cls)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 169, in _handle_exception
return request._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 768, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_http.py", line 195, in _dispatch
result = request.dispatch()
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 827, in dispatch
r = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 935, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 506, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/addons/website_real_estate/controllers/main.py", line 311, in featuredtops
prueba = random.sample(topss, 6)
File "/usr/lib/python2.7/random.py", line 323, in sample
raise ValueError("sample larger than population")
ValueError: sample larger than population
Creating the website menu link realestate/featured throws the following error:
The offending code below: