From 4ed7690d434e741c18a3037fce4f375f0490e8ad Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Wed, 24 Jan 2018 18:55:07 +0530 Subject: [PATCH] [IMP] base: add dropdown on modules kanban view and add a discover button Purpose of this commit is to ease application finding and use by improving kanban view of modules. A dropdown with action is added. It includes a discover functionality letting users go to the App page see their description. This page is based on the website of the application. When a module has a website page it is used as link for the discover feature. It allow to directly link to a webpage to discover the features of the application instead of relying on the description and/or index.html that are not up to date in most applications. Future commits will gradually remove description from modules that have a website page in order to use the discover button and avoid having outdated content. This commit is related to task 47179 and PR #22689. --- odoo/addons/base/models/ir_module.py | 7 +++++++ odoo/addons/base/views/ir_module_views.xml | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/odoo/addons/base/models/ir_module.py b/odoo/addons/base/models/ir_module.py index 4c2afe54876..14ab419f057 100644 --- a/odoo/addons/base/models/ir_module.py +++ b/odoo/addons/base/models/ir_module.py @@ -445,6 +445,13 @@ class Module(models.Model): self.write({'state': 'uninstalled', 'demo': False}) return True + @api.multi + def button_discover(self): + return { + 'type': 'ir.actions.act_url', + 'url': self.website, + } + @assert_log_admin_access @api.multi def module_uninstall(self): diff --git a/odoo/addons/base/views/ir_module_views.xml b/odoo/addons/base/views/ir_module_views.xml index d5d2efb4085..df5a741065a 100644 --- a/odoo/addons/base/views/ir_module_views.xml +++ b/odoo/addons/base/views/ir_module_views.xml @@ -68,6 +68,7 @@
Installed + +