summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-05-14 14:56:08 +0000
committerRomain Derie <rde@odoo.com>2019-05-14 15:12:50 +0000
commitc209c250d772005132b430c6a3bf3813cd6d3093 (patch)
tree8a91fc7edfcd67f8117048d7d0fbbbf936ab93d9 /addons/web/static/tests/fields/basic_fields_tests.js
parent418babf7af7b52ba3aef120de9be49dea9669b74 (diff)
[FIX] website: prevent new website homepage to be '/-1'
Before this commit, the URL of the bootstraped homepage for a new website could be '/-1' instead of '/'. Indeed, creating a new website ends up calling `page.copy` which try to get an unique URL for the website (to avoid duplicated URL after copy). Typically, the copied page will have a suffix (-X). But `get_unique_path` in charge of doing that is based on `get_current_website` method which will/could return a wrong website (not the one we created). For instance the one forced in session after using the website switcher or creating a website or installing a theme. As those website already have (most likely) a homepage '/', get_unique_path will create the bootstraped homepage with '/-1' as URL. Step to reproduce (among others): - Create a new website in backend through res.settings screen - Create another new website, it's homepage will be '/-1'. - Repeat indefinitely, every two website created, the bug will appear. (One out of two, the bug won't appear since it will try to get an unique URL on the previously created website which only has '/-1' so '/' is assumed unique) closes odoo/odoo#33372 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions