Browse Source

test controller

pull/149/head
David Beal 9 years ago
parent
commit
324cf5f27a
  1. 3
      help_contextual_popup/__openerp__.py
  2. 6
      help_contextual_popup/model.py
  3. 5
      help_contextual_popup/static/src/js/popup_help.js

3
help_contextual_popup/__openerp__.py

@ -15,7 +15,7 @@
# 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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -36,5 +36,4 @@
'static/src/xml/popup_help.xml',
],
'installable': True,
'auto_install': False,
}

6
help_contextual_popup/model.py

@ -20,6 +20,7 @@
##############################################################################
from openerp import models, fields
from openerp.http import Controller, route
class IrActionsActwindow(models.Model):
@ -29,3 +30,8 @@ class IrActionsActwindow(models.Model):
string="Custom Help",
help="Use this field to add custom content for documentation purpose")
class MyController(Controller):
@route('/help', auth='public')
def handler(self):
return 'blabla'

5
help_contextual_popup/static/src/js/popup_help.js

@ -12,8 +12,11 @@ openerp.help_contextual_popup = function(instance, local) {
return true;
}
$elem.data('click-init', true);
var help_html = '';
help_html += '<a href="http://localhost:8069/help" target="_blank" onclick="window.open(this.href,\'nom_Popup\','
help_html += '\'​height=400 , width=400 , location=no , resizable=yes , scrollbars=no\');return false;">'
help_html += '&rarr; Exemple &larr;</a>'
if (self.action.help) {
help_html += '<h3>Odoo Help</h3>'
help_html += '<div id="erp_help">' + self.action.help + '</div>';

Loading…
Cancel
Save