Url for a product become:
/shop/productname-id instead of /shop/product/productname-id
Url for a blog post become:
/blog/blogname-1/blogpost-1 instead of /blog/blogname-1/post/blogpost-1
Url for a question on forum become:
/forum/forumname-1/title-1 instead of /forum/forumname-1/question/title-1
task-2295016
* = sale, website_sale, website_sale_comparison
Purpose
=======
This allows to handle use cases such as grape varieties for wine products where
multiple values need to be set for the same attribute, but they are all
informative and should not generate a choice or variants.
The general logic that existed previously is kept:
- multiple attribute lines on a product behave as an AND between them
- multiple values on a line behave as an OR between them
Example
=======
To generate 2 variants, with one possible value for each:
Line A: val 1, val 2
To generate 1 variant, with both informative values on it:
Line A: val 1
Line A: val 2
Technically
===========
- remove the constraints that prevented this use case from working since the
refactoring done in the previous commit removed the ambiguity when two
different lines have the same value
- update the product and comparison views accordingly
Extra
=====
- make the attribute category translatable and improve its list view
Final part of task-1912579
PR: #32946
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Juhil Somaiya <jso@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Pretty much the whole module is covered by the tests in this commit:
- standard comparison, from shop, from product page
- comparison with more complicated product configuration
- the comparison page itself
- the alternative products
task-1929151
closesodoo/odoo#32901
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
* website_theme_install
This commit will add MODULE_UNINSTALL_FLAG to the cleanup methods of themes and
modules.
This is necessary to also unlink inherited views of those we try to unlink.
Before this commit, an error would be raised when trying to delete a view that
still had other inherited views (either created manually by the user, or with
just bad luck in the order of which the views are deleted).
PR: #29753
If a module has a view that has been copied (copy on write, web editor,
customize show, manual copy, ...), currently the copied view will not be deleted
if the module of the original view is removed.
If the copy is not used anymore, it is not a problem (but still polluting the
database), but if the copy is still used (ex. it is an inherit of a view still
in use), then it will crash if that copy references other data (views, fields,
...) that were in the module that is now removed.
Eg.
The view `website_sale_comparison.product_add_to_compare` is inheriting
`website_sale.product` and calls `website_sale_comparison.add_to_compare`.
If the view `website_sale_comparison.product_add_to_compare` is copied (when
using the web editor on the product page -> copy on write is making a copy of
the `product` view and all its tree), then the product page on website will
crash when the module `website_sale_comparison` is removed because
`product_add_to_compare` will call the deleted view `add_to_compare`.
The solution is to also remove copied views when removing a module. Instead of
just using the xml id, we should look for the `key` starting with the module
name currently removed, because copied views don't have an external id.
task-1920005
PR: #29753