Files
odoo_source/addons/website_event_track/data
rde c8c52cd272 [FIX] website_event(_track): changing event menu name break behavior
Before this commit:
To know if an event menu is an auto generated one (eg: location, register..),
it checks if the menu name is the same as the hardcoded one in
_get_standard_menu_entries_names.
If user change the menu name, the code won't retrieve it and will act as if the
menu had been deleted and it will recreate it.

This leads to 2 bugs:
*First (website_event)
 - Change menu name from website_event (eg: location, introduction or register)
 - Check/Uncheck 'Track on website' or 'Track Proposals on website' to force
   the code to rewrite missing menus.
 - Go back to the event front end, theses menus have now been recreated, and
   are duplicated.

*Second (website_event_track)
 - Check 'Track on website' on event's back end
 - Change the 'Talks' menu name in front end
 - Go back to backend, 'Track on website' is unchecked because
   _compute_website_track won't retrieve an event menu named exactly 'Talks'

Now:
We don't use euristics to try to recover missing menus.
We just create related menu when option is checked, and we delete them when
option is unchecked.
To know which menu item comes from which option, we store a value in a new
model 'website.event.menu'.

We don't want to try to check if the menus are all there and recreate them if
needed anymore. There is cases where user wan't to delete a menu and repace
it with a link to that menu's URL in the page content.
Before this commit, the option would've been unchecked since it won't
retrieve the menu.
2017-12-12 17:46:32 +01:00
..