diff options
| author | DramixDw <rve@odoo.com> | 2020-04-23 07:19:13 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-05-01 07:59:07 +0000 |
| commit | 9b9829416ba0b09901a3de1578ff172024ab4f35 (patch) | |
| tree | 58c9cd7ef90e46e287d1e56aa84b693100a1bc3a /addons/website_mail_channel | |
| parent | 52c23e01e3592126b4b4d6bde75e25594f203a99 (diff) | |
[IMP] website: simplify website menu
Some apps, once installed, automatically create a menuitem in website.
What complexify the UI and create useless menu withtout plusvalue.
It is not because you install livechat to make support online, that you want
a link in your menu to show stats e.g.
Now we remove the default menu created, and help user to find it when he create
a link. The autocomplete suggest most of the main App's controllers
task-2189613
closes odoo/odoo#49081
Related: odoo/enterprise#9733
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website_mail_channel')
| -rw-r--r-- | addons/website_mail_channel/data/mail_template_data.xml | 9 | ||||
| -rw-r--r-- | addons/website_mail_channel/models/__init__.py | 1 | ||||
| -rw-r--r-- | addons/website_mail_channel/models/website.py | 14 |
3 files changed, 15 insertions, 9 deletions
diff --git a/addons/website_mail_channel/data/mail_template_data.xml b/addons/website_mail_channel/data/mail_template_data.xml index 0f3056ea2c4..52859d08aae 100644 --- a/addons/website_mail_channel/data/mail_template_data.xml +++ b/addons/website_mail_channel/data/mail_template_data.xml @@ -175,13 +175,4 @@ </record> </data> - <data noupdate="1"> - <record id="menu_mailing_list" model="website.menu"> - <field name="name">Mailing Lists</field> - <field name="url">/groups</field> - <field name="parent_id" ref="website.main_menu"/> - <field name="sequence">55</field> - </record> - </data> - </odoo> diff --git a/addons/website_mail_channel/models/__init__.py b/addons/website_mail_channel/models/__init__.py index 5280d256a09..f5c2bbb5e3c 100644 --- a/addons/website_mail_channel/models/__init__.py +++ b/addons/website_mail_channel/models/__init__.py @@ -2,3 +2,4 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import mail_channel from . import mail_mail +from . import website diff --git a/addons/website_mail_channel/models/website.py b/addons/website_mail_channel/models/website.py new file mode 100644 index 00000000000..854e99bdbe8 --- /dev/null +++ b/addons/website_mail_channel/models/website.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models, _ +from odoo.addons.http_routing.models.ir_http import url_for + + +class Website(models.Model): + _inherit = "website" + + def get_suggested_controllers(self): + suggested_controllers = super(Website, self).get_suggested_controllers() + suggested_controllers.append((_('Mailing Lists'), url_for('/groups'), 'website_mail_channel')) + return suggested_controllers |
