Files
odoo_source/addons/website_event/tests
Romain Derieandqsm-odoo 5d1e9bfbad [FIX] website, *: add website_id in seo save rpc context
*: website_event

Without this, the seo saving would not forward the current website in
the context. It's especially bad in this case as it's writing on views
which are not triggering the COW due to the lack of a website_id in the
context.

Step to reproduce:
- Go to /shop (if you didn't do anything, this will be bound to the
  `website_sale.products` view which has no website_id set and is called
  a generic view)
- Open "Optimize SEO" dialog and type something in the title
- Save
- It saved the change on the mentioned view, without duplicating it
  (COW) before writing on it. The title you added is now applied to
  every websites and not only the one you edited, which is against the
  website holy grail rule: only the website you edit should be changed.

Technically, this is because we refactored that part of the code in Odoo
16: the website is now editable in the backend.

Note that this fix also revealed that a test for events (which has been
introduced with [1]) was relying on the bug: it tested the meta title of
a view that should (and will after this fix) have been COW'ed. This test
will now indirectly protects this bug from re-happening, although we
might want to write a dedicated test in the future as the behavior for
events might need some refactoring.

[1]: https://github.com/odoo/odoo/commit/2072a7739eb9a9ee87c8b3c7b0d43a82a7e2375f

opw-3499285

closes odoo/odoo#136550

X-original-commit: c45c0bf8fff7285a9fff33ff9bf1c24bbfb130e7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-09-26 13:35:42 +00:00
..
…