-
- Downloads
[FIX] website{,_forum}: wrong forum post link when created from the website
Steps to reproduce ================== - Website > Go to website - Forum > New post - Fill the form and post your question - Go to the backend - Website > Forum > Post - Click on the one you just created - Click on the link in the chatter -> It goes to an ir.ui.view model Cause of the issue ================== Since the form is posted from the frontend, the inherit_branding is automatically added to the context. This causes the data-oe-{model,view,id} to be added to the button. https://github.com/odoo/odoo/blob/46ce4345c96a58845bfa13dd1a86be391cf0a923/addons/website/models/ir_ui_view.py#L425-L426 Solution ======== - Set a context key `inherit_branding` to False inside `message_post_with_view`. - In `_render`, only set the key to True if it is not set. - Also do the same for `inherit_branding_auto` opw-3070490 closes odoo/odoo#108427 Signed-off-by:Hubert Van De Walle <huvw@odoo.com>
Showing
- addons/website/models/__init__.py 1 addition, 0 deletionsaddons/website/models/__init__.py
- addons/website/models/ir_ui_view.py 2 additions, 2 deletionsaddons/website/models/ir_ui_view.py
- addons/website/models/mail_thread.py 8 additions, 0 deletionsaddons/website/models/mail_thread.py
- addons/website_forum/tests/test_forum.py 15 additions, 0 deletionsaddons/website_forum/tests/test_forum.py
addons/website/models/mail_thread.py
0 → 100644
Please register or sign in to comment