diff --git a/help_contextual_popup/README.rst b/help_contextual_popup/README.rst
deleted file mode 100644
index 3a59725e..00000000
--- a/help_contextual_popup/README.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-Add contextual help popup
-=========================
-
-This module add a contextual html help popup on each model action.
-You also may use dedicated field custom_help on actions to add specific help
-
-Installation
-============
-
-It was tested on Odoo 8.0 branch.
-
-Credits
-=======
-
-Akretion
-
-Contributors
-------------
-
-* Sylvain Calador
-* David Beal
-
-Maintainer
-----------
-
-.. image:: http://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: http://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
-
-To contribute to this module, please visit http://odoo-community.org.
-
diff --git a/help_contextual_popup/__init__.py b/help_contextual_popup/__init__.py
deleted file mode 100644
index 14e0972c..00000000
--- a/help_contextual_popup/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from . import model
-from . import controller
diff --git a/help_contextual_popup/controller.py b/help_contextual_popup/controller.py
deleted file mode 100644
index e3b00d91..00000000
--- a/help_contextual_popup/controller.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# coding: utf-8
-##############################################################################
-#
-# Odoo, Open Source Management Solution
-# Copyright (C) 2015-TODAY Akretion ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from openerp.http import Controller, route, request
-
-
-class MyController(Controller):
- @route([
- "/help/",
- ], type='http', auth="public")
- def handler(self, action_id, *args, **kwargs):
- req = request.session.model('ir.actions.act_window')
- return 'blabla %s db %s' % (action_id, req)
-
- def _get_html_tpl(self):
- return """
-
- {{title}}
- {{head}}
-
-
- {{h1}}
-{{body}}
-
-"""
diff --git a/help_popup/README.rst b/help_popup/README.rst
new file mode 100644
index 00000000..198795f1
--- /dev/null
+++ b/help_popup/README.rst
@@ -0,0 +1,76 @@
+
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :alt: License: AGPL-3
+
+Help Popup
+===========
+
+This module adds an html help popup on each model action.
+Two help fields are added to actions: owner_help and custom_help.
+
+
+Installation
+============
+
+It was tested on Odoo 8.0 branch.
+
+
+Configuration
+=============
+
+Go to the action of your choice to add some help content
+or put data in some modules.
+
+
+Usage
+=====
+
+Click on ? button
+
+.. image:: help_popup/static/description/popup.png
+ :alt: License: Help Popup
+
+
+Known issues / Roadmap
+======================
+
+* ...
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
+`here `_.
+
+
+Credits
+=======
+
+Contributors
+------------
+
+* Sylvain Calador
+* David Beal
+
+
+Icons
+------
+https://www.iconfinder.com/Vecteezy
+
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+To contribute to this module, please visit http://odoo-community.org.
diff --git a/help_popup/__init__.py b/help_popup/__init__.py
new file mode 100644
index 00000000..9186ee3a
--- /dev/null
+++ b/help_popup/__init__.py
@@ -0,0 +1 @@
+from . import model
diff --git a/help_contextual_popup/__openerp__.py b/help_popup/__openerp__.py
similarity index 89%
rename from help_contextual_popup/__openerp__.py
rename to help_popup/__openerp__.py
index 154f58de..24cbf863 100644
--- a/help_contextual_popup/__openerp__.py
+++ b/help_popup/__openerp__.py
@@ -20,8 +20,8 @@
##############################################################################
{
- 'name': 'Help Contextual Popup',
- 'version': '0.1',
+ 'name': 'Help Popup',
+ 'version': '0.5',
'author': 'Akretion, Odoo Community Association (OCA)',
'depends': [
'web',
@@ -31,6 +31,11 @@
'data': [
'views/popup_help_view.xml',
'views/action_view.xml',
+ 'report/report.xml',
+ 'report/help.xml',
+ ],
+ 'demo': [
+ 'demo/help.xml',
],
'qweb': [
'static/src/xml/popup_help.xml',
diff --git a/help_popup/demo/help.xml b/help_popup/demo/help.xml
new file mode 100644
index 00000000..6fc5a031
--- /dev/null
+++ b/help_popup/demo/help.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+ Hi Odooer,
+
+
+
+
+I'm the field 'owner_help' in the Customer action model
+
+
+I'm displayed in a Qweb html report
+
+
+
+Don't hesitate to customized me with your own words and syntax
+
+
+ ]]>
+
+
+
+
+
+ Hi developers,
+
+
+
+
+I'm the field 'custom_help' in the customer action also displayed in Qweb report.
+
+
+Akretion wrote these words to explain my main purpose:
+
+Allows to developers to write documentation on their work.
+
+
+
+
+
+
+You can write any html tag. Here is an image with img tag
+
+
+
+ ]]>
+
+
+
+
diff --git a/help_contextual_popup/model.py b/help_popup/model.py
similarity index 83%
rename from help_contextual_popup/model.py
rename to help_popup/model.py
index f3b8f93e..8ddadf43 100644
--- a/help_contextual_popup/model.py
+++ b/help_popup/model.py
@@ -25,6 +25,11 @@ from openerp import models, fields
class IrActionsActwindow(models.Model):
_inherit = 'ir.actions.act_window'
+ owner_help = fields.Html(
+ string="Owner Help",
+ help="Use this field to add custom content for documentation purpose\n"
+ "mainly for the ERP owner")
custom_help = fields.Text(
string="Custom Help",
- help="Use this field to add custom content for documentation purpose")
+ help="Use this field to add custom content for documentation purpose\n"
+ "mainly for module developers")
diff --git a/help_popup/report/help.xml b/help_popup/report/help.xml
new file mode 100644
index 00000000..b9ef8354
--- /dev/null
+++ b/help_popup/report/help.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Help from developer
+
+
+
+
+
Help from Odoo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/help_popup/report/report.xml b/help_popup/report/report.xml
new file mode 100644
index 00000000..b0ecadc6
--- /dev/null
+++ b/help_popup/report/report.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/help_popup/static/description/icon.png b/help_popup/static/description/icon.png
new file mode 100644
index 00000000..4696ffe5
Binary files /dev/null and b/help_popup/static/description/icon.png differ
diff --git a/help_popup/static/description/popup.png b/help_popup/static/description/popup.png
new file mode 100644
index 00000000..812551cc
Binary files /dev/null and b/help_popup/static/description/popup.png differ
diff --git a/help_contextual_popup/static/src/js/popup_help.js b/help_popup/static/src/js/popup_help.js
similarity index 79%
rename from help_contextual_popup/static/src/js/popup_help.js
rename to help_popup/static/src/js/popup_help.js
index 7ab4ed59..60be3ef8 100644
--- a/help_contextual_popup/static/src/js/popup_help.js
+++ b/help_popup/static/src/js/popup_help.js
@@ -1,4 +1,4 @@
-openerp.help_contextual_popup = function(instance, local) {
+openerp.help_popup = function(instance, local) {
var _t = instance.web._t;
instance.web.ViewManager.include({
@@ -13,10 +13,10 @@ openerp.help_contextual_popup = function(instance, local) {
}
$elem.data('click-init', true);
$elem.on('click', function(e) {
- var params = 'height=400, width=600, location=no, ';
+ var params = 'height=650, width=800, location=no, ';
params += 'resizable=yes, menubar=yes, titlebar=Bla';
path = self.action.id;
- my_window = window.open('/help/' + path, 'Help', params);
+ my_window = window.open('/report/html/help_popup.tpl_help/' + path, 'Help', params);
// allows to back to the window if opened previoulsy
setTimeout('my_window.focus()', 1);
});
diff --git a/help_contextual_popup/static/src/xml/popup_help.xml b/help_popup/static/src/xml/popup_help.xml
similarity index 100%
rename from help_contextual_popup/static/src/xml/popup_help.xml
rename to help_popup/static/src/xml/popup_help.xml
diff --git a/help_contextual_popup/views/action_view.xml b/help_popup/views/action_view.xml
similarity index 91%
rename from help_contextual_popup/views/action_view.xml
rename to help_popup/views/action_view.xml
index df9098d2..e01c65f8 100644
--- a/help_contextual_popup/views/action_view.xml
+++ b/help_popup/views/action_view.xml
@@ -8,6 +8,7 @@
ref="base.view_window_action_form"/>
+
diff --git a/help_contextual_popup/views/popup_help_view.xml b/help_popup/views/popup_help_view.xml
similarity index 69%
rename from help_contextual_popup/views/popup_help_view.xml
rename to help_popup/views/popup_help_view.xml
index 1449ad20..c01b79b8 100644
--- a/help_contextual_popup/views/popup_help_view.xml
+++ b/help_popup/views/popup_help_view.xml
@@ -3,7 +3,7 @@
-
+