diff --git a/help_online/__openerp__.py b/help_online/__openerp__.py index f09ea63e..b0d02833 100644 --- a/help_online/__openerp__.py +++ b/help_online/__openerp__.py @@ -47,10 +47,12 @@ The help pages are created and managed via the website Module. 'data': [ 'data/help_auto_backup.xml', # must always be the first 'security/help_online_groups.xml', + 'security/help_online_rules.xml', + 'views/export_help_wizard_view.xml', + 'views/import_help_wizard_view.xml', + 'views/ir_ui_view_view.xml', 'views/help_online_view.xml', 'views/website_help_online.xml', - 'views/ir_ui_view_view.xml', - 'views/export_help_wizard_view.xml', 'data/ir_config_parameter_data.xml', ], 'qweb': [ diff --git a/help_online/i18n/fr_BE.po b/help_online/i18n/fr_BE.po new file mode 100644 index 00000000..d35153b5 --- /dev/null +++ b/help_online/i18n/fr_BE.po @@ -0,0 +1,222 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * help_online +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-14 09:06+0000\n" +"PO-Revision-Date: 2014-10-14 09:06+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: help_online +#. openerp-web +#: code:addons/help_online/static/src/js/help_online.js:83 +#, python-format +msgid "Cancel" +msgstr "Annuler" + +#. module: help_online +#: view:export.help.wizard:help_online.export_help_wizard_view +#: view:import.help.wizard:help_online.import_help_wizard_view +msgid "Close" +msgstr "Fermer" + +#. module: help_online +#. openerp-web +#: code:addons/help_online/static/src/js/help_online.js:81 +#, python-format +msgid "Confirm" +msgstr "Confirmer" + +#. module: help_online +#: code:addons/help_online/models/help_online.py:60 +#, python-format +msgid "Create Help page for %s" +msgstr "Créer lapage d'aide pour %s" + +#. module: help_online +#: field:export.help.wizard,create_uid:0 +#: field:help.online,create_uid:0 +#: field:import.help.wizard,create_uid:0 +msgid "Created by" +msgstr "Créé par" + +#. module: help_online +#: field:export.help.wizard,create_date:0 +#: field:help.online,create_date:0 +#: field:import.help.wizard,create_date:0 +msgid "Created on" +msgstr "Créé le" + +#. module: help_online +#: view:export.help.wizard:help_online.export_help_wizard_view +msgid "Export" +msgstr "Export" + +#. module: help_online +#: model:ir.actions.act_window,name:help_online.action_export_help_wizard +msgid "Export Help" +msgstr "Export Help" + +#. module: help_online +#: view:export.help.wizard:help_online.export_help_wizard_view +msgid "Export Help Data" +msgstr "Export des pages d'aide" + +#. module: help_online +#: model:ir.model,name:help_online.model_export_help_wizard +#: model:ir.ui.menu,name:help_online.menu_help_export +msgid "Export Help Online" +msgstr "Export des pages d'aide" + +#. module: help_online +#: field:export.help.wizard,export_filename:0 +msgid "Export XML Filename" +msgstr "Fichier XML" + +#. module: help_online +#: model:ir.ui.menu,name:help_online.menu_help +#: model:ir.ui.menu,name:help_online.menu_help_main +msgid "Help Online" +msgstr "Aide en ligne" + +#. module: help_online +#: code:addons/help_online/models/help_online.py:55 +#, python-format +msgid "Help on %s" +msgstr "Aide sur %s" + +#. module: help_online +#: model:res.groups,name:help_online.help_online_group_reader +msgid "Help reader" +msgstr "Aide: lecteur" + +#. module: help_online +#: model:res.groups,name:help_online.help_online_group_writer +msgid "Help writer" +msgstr "Aide: rédacteur" + +#. module: help_online +#: field:export.help.wizard,id:0 +#: field:help.online,id:0 +#: field:import.help.wizard,id:0 +msgid "ID" +msgstr "ID" + +#. module: help_online +#: view:import.help.wizard:help_online.import_help_wizard_view +msgid "Import" +msgstr "Import" + +#. module: help_online +#: model:ir.actions.act_window,name:help_online.action_import_help_wizard +msgid "Import Help" +msgstr "Import des pages d'aide" + +#. module: help_online +#: view:import.help.wizard:help_online.import_help_wizard_view +msgid "Import Help Data" +msgstr "Import des pages d'aide" + +#. module: help_online +#: model:ir.ui.menu,name:help_online.menu_help_import +msgid "Import Help Online" +msgstr "Import des pages d'aide" + +#. module: help_online +#: field:export.help.wizard,write_uid:0 +#: field:help.online,write_uid:0 +#: field:import.help.wizard,write_uid:0 +msgid "Last Updated by" +msgstr "Mis à jour par" + +#. module: help_online +#: field:export.help.wizard,write_date:0 +#: field:help.online,write_date:0 +#: field:import.help.wizard,write_date:0 +msgid "Last Updated on" +msgstr "Mis à jour le" + +#. module: help_online +#: code:addons/help_online/models/export_help_wizard.py:238 +#, python-format +msgid "No data to export !" +msgstr "Aucune page à exporter !" + +#. module: help_online +#: code:addons/help_online/models/help_online.py:33 +#, python-format +msgid "No page prefix parameter specified !" +msgstr "Le paramètre spécifiant le préfixe des page n'est pas configuré !" + +#. module: help_online +#. openerp-web +#: code:addons/help_online/static/src/js/help_online.js:88 +#, python-format +msgid "Ok" +msgstr "Ok" + +#. module: help_online +#. openerp-web +#: code:addons/help_online/static/src/js/help_online.js:107 +#, python-format +msgid "Page does not exist. Do you want to create?" +msgstr "La page n'existe pas. Voulez-vous la créer?" + +#. module: help_online +#: field:import.help.wizard,source_file:0 +msgid "Source File" +msgstr "Fichier de données" + +#. module: help_online +#: view:export.help.wizard:help_online.export_help_wizard_view +msgid "This wizard allow you to export all QWeb views\n" +" related to help online. The result will be an Odoo\n" +" data xml file." +msgstr "Cet assistant vous permet d'exporter toutes les vues QWeb \n" +" concernant l'aide. Le résultat sera un\n" +" fichier de données Odoo." + +#. module: help_online +#: view:import.help.wizard:help_online.import_help_wizard_view +msgid "This wizard allow you to import QWeb views\n" +" related to help online. The required file format is an Odoo\n" +" data xml file." +msgstr "Cet assistant vous permet d'importer toutes les vues QWeb\n" +" concernant l'aide. Le format de fichier requis est un\n" +" fichier de données Odoo." + +#. module: help_online +#: code:addons/help_online/models/export_help_wizard.py:275 +#, python-format +msgid "Unable to write autobackup file in given directory: %s" +msgstr "Impossible d'écrire le fichier de sauvegarde dans le répertoire spécifié: %s" + +#. module: help_online +#: view:ir.ui.view:help_online.view_view_search +msgid "Website Page" +msgstr "Page du site" + +#. module: help_online +#: view:ir.ui.view:help_online.view_view_form +msgid "Website Page?" +msgstr "Page du site?" + +#. module: help_online +#: model:ir.actions.act_window,name:help_online.action_website_pages +#: model:ir.ui.menu,name:help_online.menu_help_pages +msgid "Website Pages" +msgstr "Pages du site" + +#. module: help_online +#: field:export.help.wizard,data:0 +msgid "XML" +msgstr "XML" + diff --git a/help_online/models/__init__.py b/help_online/models/__init__.py index 198e5bb3..615fa9cc 100644 --- a/help_online/models/__init__.py +++ b/help_online/models/__init__.py @@ -20,4 +20,5 @@ ############################################################################## from . import help_online from . import export_help_wizard +from . import import_help_wizard from . import ir_model diff --git a/help_online/models/export_help_wizard.py b/help_online/models/export_help_wizard.py index c3003b5b..e504a7b4 100644 --- a/help_online/models/export_help_wizard.py +++ b/help_online/models/export_help_wizard.py @@ -50,9 +50,10 @@ class ExportHelpWizard(models.TransientModel): - Replace db id in url with xml id ''' - def substitute_id_by_xml_id(): + def substitute_id_by_xml_id(img_elem): new_src = False attach_id = False + img_src = img_elem.get('src') if 'id=' in img_src: id_pos = img_src.index('id=') + 3 attach_id = img_elem.get('src')[id_pos:] @@ -71,9 +72,8 @@ class ExportHelpWizard(models.TransientModel): i_img += 1 xml_id = "%s_img_%s" % \ (page_node.attrib['name'], str(i_img).rjust(2, '0')) - img_src = img_elem.get('src') - new_src, attach_id = substitute_id_by_xml_id() + new_src, attach_id = substitute_id_by_xml_id(img_elem) if not attach_id: continue diff --git a/help_online/models/import_help_wizard.py b/help_online/models/import_help_wizard.py new file mode 100644 index 00000000..bb071784 --- /dev/null +++ b/help_online/models/import_help_wizard.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# 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 import models, fields, api +from openerp.tools import convert + +import base64 +from cStringIO import StringIO + + +class ImportHelpWizard(models.TransientModel): + _name = "import.help.wizard" + + source_file = fields.Binary('Source File') + + @api.one + def import_help(self): + source_file = base64.decodestring(self.source_file) + convert.convert_xml_import(self.env.cr, + self._module, + StringIO(source_file), + idref=None, + mode='init', + noupdate=False, + report=None) diff --git a/help_online/security/help_online_rules.xml b/help_online/security/help_online_rules.xml new file mode 100644 index 00000000..92a70a7a --- /dev/null +++ b/help_online/security/help_online_rules.xml @@ -0,0 +1,32 @@ + + + + + Online Help Hidden by Default + + [ + '|', + ('type', '!=', 'qweb'), + ('name','not like','help-%'), + ] + + + + + + + Online Help for Help Reader + + [(1, '=', 1)] + + + + + + \ No newline at end of file diff --git a/help_online/views/help_online_view.xml b/help_online/views/help_online_view.xml index c53cbce3..6ee45346 100644 --- a/help_online/views/help_online_view.xml +++ b/help_online/views/help_online_view.xml @@ -9,5 +9,20 @@ + + + Website Pages + ir.ui.view + + form + tree, form + {"search_default_website":1} + + + + + + + diff --git a/help_online/views/import_help_wizard_view.xml b/help_online/views/import_help_wizard_view.xml new file mode 100644 index 00000000..15aa93c3 --- /dev/null +++ b/help_online/views/import_help_wizard_view.xml @@ -0,0 +1,46 @@ + + + + + import.help.wizard.view + import.help.wizard + form + +
+ +

+ This wizard allow you to import QWeb views + related to help online. The required file format is an Odoo + data xml file. +

+
+ + + +
+ +
+
+
+
+ + + Import Help + import.help.wizard + + form + form + new + ir.actions.act_window + + +
+
\ No newline at end of file diff --git a/help_online/views/ir_ui_view_view.xml b/help_online/views/ir_ui_view_view.xml index 85fc7783..de42f9ca 100644 --- a/help_online/views/ir_ui_view_view.xml +++ b/help_online/views/ir_ui_view_view.xml @@ -8,7 +8,7 @@ ir.ui.view - +