Browse Source
Merge branch '9.0' of github.com:OCA/web into 9.0-mig-web_dashboard_tile
pull/507/head
Merge branch '9.0' of github.com:OCA/web into 9.0-mig-web_dashboard_tile
pull/507/head
Nicolas Mac Rouillon
8 years ago
81 changed files with 2152 additions and 1039 deletions
-
7README.md
-
69help_online/README.rst
-
23help_online/__init__.py
-
51help_online/__openerp__.py
-
22help_online/controllers/__init__.py
-
21help_online/controllers/help_online_controllers.py
-
244help_online/i18n/es.po
-
165help_online/i18n/fr.po
-
158help_online/i18n/sl.po
-
24help_online/models/__init__.py
-
33help_online/models/help_online.py
-
49help_online/models/import_help_wizard.py
-
26help_online/models/ir_model.py
-
8help_online/security/help_online_groups.xml
-
6help_online/security/help_online_rules.xml
-
11help_online/static/src/css/help_online.css
-
145help_online/static/src/js/help_online.js
-
21help_online/static/src/js/website_help_online.editor.js
-
41help_online/static/src/xml/help_online.xml
-
30help_online/tests/__init__.py
-
100help_online/tests/common.py
-
121help_online/tests/test_export_help_wizard.py
-
58help_online/tests/test_help_online.py
-
59help_online/tests/test_import_help_wizard.py
-
52help_online/views/export_help_wizard_view.xml
-
8help_online/views/help_online_view.xml
-
46help_online/views/import_help_wizard_view.xml
-
10help_online/views/ir_ui_view_view.xml
-
12help_online/views/website_help_online.xml
-
6help_online/wizards/__init__.py
-
227help_online/wizards/export_help_wizard.py
-
50help_online/wizards/export_help_wizard_view.xml
-
53help_online/wizards/import_help_wizard.py
-
43help_online/wizards/import_help_wizard_view.xml
-
1setup/help_online/odoo_addons/__init__.py
-
1setup/help_online/odoo_addons/help_online
-
6setup/help_online/setup.py
-
1setup/web_menu_collapsible/odoo_addons/__init__.py
-
1setup/web_menu_collapsible/odoo_addons/web_menu_collapsible
-
6setup/web_menu_collapsible/setup.py
-
2web_dialog_size/__openerp__.py
-
2web_export_view/__openerp__.py
-
10web_export_view/i18n/de.po
-
10web_export_view/i18n/es.po
-
10web_export_view/i18n/fr.po
-
10web_export_view/i18n/is.po
-
10web_export_view/i18n/nl.po
-
10web_export_view/i18n/sl.po
-
11web_export_view/static/src/js/web_export_view.js
-
17web_m2x_options/i18n/es.po
-
2web_m2x_options/static/src/js/form.js
-
67web_menu_collapsible/README.rst
-
3web_menu_collapsible/__init__.py
-
18web_menu_collapsible/__openerp__.py
-
BINweb_menu_collapsible/static/description/icon.png
-
BINweb_menu_collapsible/static/description/menu_collapsible_1.png
-
BINweb_menu_collapsible/static/description/menu_collapsible_2.png
-
43web_menu_collapsible/static/src/css/menu_collapsible.css
-
23web_menu_collapsible/static/src/js/menu_collapsible.js
-
9web_menu_collapsible/templates/menu_collapsible.xml
-
5web_responsive/README.rst
-
2web_responsive/__openerp__.py
-
9web_responsive/i18n/es.po
-
9web_responsive/static/lib/css/drawer.3.2.0.css
-
10web_responsive/static/lib/js/drawer.3.2.0.js
-
26web_responsive/static/src/js/web_responsive.js
-
13web_responsive/static/src/less/app_drawer.less
-
94web_responsive/static/src/less/form_view.less
-
44web_responsive/static/src/less/main.less
-
185web_responsive/static/src/less/navbar.less
-
11web_responsive/static/src/less/variables.less
-
2web_responsive/tests/test_ui.py
-
5web_responsive/views/assets.xml
-
40web_responsive/views/web.xml
-
26web_tree_dynamic_colored_field/i18n/es.po
-
54web_widget_image_webcam/i18n/es.po
-
54web_widget_image_webcam/i18n/fr.po
-
54web_widget_image_webcam/i18n/sl.po
-
7web_widget_x2many_2d_matrix/static/src/js/web_widget_x2many_2d_matrix.js
-
27web_x2many_delete_all/i18n/es.po
@ -0,0 +1,69 @@ |
|||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
=========== |
|||
Help Online |
|||
=========== |
|||
|
|||
|
|||
This module allows the creation of an online help available from the lists |
|||
and forms in Odoo. |
|||
|
|||
When loading a view, the module generates a button allowing access to an help |
|||
page for the related model if the page exists and the user is member of the |
|||
group 'Help reader'. If the page doesn't exist and the user is member of |
|||
the group 'Help writer', the module generate a button allowing the creation an |
|||
help page. |
|||
|
|||
The help pages are created and managed via the website Module. |
|||
|
|||
Note: When updating the page prefix parameters, the record rules must be |
|||
adapted. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|||
:alt: Try me on Runbot |
|||
:target: https://runbot.odoo-community.org/runbot/162/9.0 |
|||
|
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
Even if the generated urls to the documentation contains an anchor (website/hel-xx#view_type), |
|||
it's no more possible to insert/edit anchors elements into the website since this functionnality is not supported |
|||
by the new html editor in Odoo 9.0 (summernote). |
|||
|
|||
|
|||
Bug Tracker |
|||
=========== |
|||
|
|||
Bugs are tracked on `GitHub Issues |
|||
<https://github.com/OCA/web/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. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Laurent Mignon <laurent.mignon@acsone.eu> |
|||
* Jonathan Nemry <jonathan.nemry@acsone.eu> |
|||
* Cédric Pigeon <cedric.pigeon@acsone.eu> |
|||
|
|||
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 https://odoo-community.org. |
@ -1,22 +1,7 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Authors: Nemry Jonathan |
|||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import controllers |
|||
from . import models |
|||
from . import wizards |
@ -1,65 +1,30 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Authors: Nemry Jonathan |
|||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
'name': 'Help Online', |
|||
'version': '8.0.1.0.0', |
|||
'version': '9.0.1.0.0', |
|||
'author': "ACSONE SA/NV,Odoo Community Association (OCA)", |
|||
'maintainer': 'ACSONE SA/NV', |
|||
'website': 'http://www.acsone.eu', |
|||
'license': 'AGPL-3', |
|||
'category': 'Documentation', |
|||
'depends': [ |
|||
'base', |
|||
'website', |
|||
], |
|||
'description': """ |
|||
Help Online |
|||
=========== |
|||
|
|||
This module allows the creation of an online help available from the lists |
|||
and forms in Odoo. |
|||
|
|||
When loading a view, the module generates a button allowing access to an help |
|||
page for the related model if the page exists and the user is member of the |
|||
group 'Help reader'. If the page doesn't exist and the user is member of |
|||
the group 'Help writer', the module generate a button allowing the creation an |
|||
help page. |
|||
|
|||
The help pages are created and managed via the website Module. |
|||
|
|||
Note: When updating the page prefix parameters, the record rules must be |
|||
adapted. |
|||
""", |
|||
'data': [ |
|||
'security/help_online_groups.xml', |
|||
'security/help_online_rules.xml', |
|||
'views/export_help_wizard_view.xml', |
|||
'views/import_help_wizard_view.xml', |
|||
'wizards/export_help_wizard_view.xml', |
|||
'wizards/import_help_wizard_view.xml', |
|||
'views/ir_ui_view_view.xml', |
|||
'views/help_online_view.xml', |
|||
'views/website_help_online.xml', |
|||
'data/ir_config_parameter_data.xml', |
|||
], |
|||
'qweb': [ |
|||
'static/src/xml/help_online.xml', |
|||
], |
|||
'installable': False, |
|||
'auto_install': False, |
|||
'installable': True, |
|||
} |
@ -1,21 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Authors: Laurent Mignon |
|||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from .import help_online_controllers |
@ -0,0 +1,244 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * help_online |
|||
# |
|||
# Translators: |
|||
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-14 02:26+0000\n" |
|||
"PO-Revision-Date: 2017-01-14 02:26+0000\n" |
|||
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n" |
|||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: es\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.export_help_wizard_view |
|||
#: model:ir.ui.view,arch_db:help_online.import_help_wizard_view |
|||
msgid "Close" |
|||
msgstr "Cerrar" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/models/help_online.py:45 |
|||
#, python-format |
|||
msgid "Create Help page for %s" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_create_uid |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_create_uid |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_create_uid |
|||
msgid "Created by" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_create_date |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_create_date |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_create_date |
|||
msgid "Created on" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_display_name |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_display_name |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_display_name |
|||
msgid "Display Name" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.export_help_wizard_view |
|||
msgid "Export" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/wizards/export_help_wizard.py:302 |
|||
#: model:ir.actions.act_window,name:help_online.action_export_help_wizard |
|||
#, python-format |
|||
msgid "Export Help" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.export_help_wizard_view |
|||
msgid "Export Help Data" |
|||
msgstr "" |
|||
|
|||
#. 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 "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_export_filename |
|||
msgid "Export XML Filename" |
|||
msgstr "" |
|||
|
|||
#. 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 "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/models/help_online.py:40 |
|||
#, python-format |
|||
msgid "Help on %s" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:res.groups,name:help_online.help_online_group_reader |
|||
msgid "Help reader" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:res.groups,name:help_online.help_online_group_writer |
|||
msgid "Help writer" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_id |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_id |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_id |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.import_help_wizard_view |
|||
msgid "Import" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.actions.act_window,name:help_online.action_import_help_wizard |
|||
msgid "Import Help" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.import_help_wizard_view |
|||
msgid "Import Help Data" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.menu,name:help_online.menu_help_import |
|||
msgid "Import Help Online" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard___last_update |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online___last_update |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard___last_update |
|||
msgid "Last Modified on" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_write_uid |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_write_uid |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_write_uid |
|||
msgid "Last Updated by" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_write_date |
|||
#: model:ir.model.fields,field_description:help_online.field_help_online_write_date |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_write_date |
|||
msgid "Last Updated on" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/wizards/export_help_wizard.py:295 |
|||
#, python-format |
|||
msgid "No data to export !" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/models/help_online.py:17 |
|||
#, python-format |
|||
msgid "No page prefix parameter specified !" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/wizards/export_help_wizard.py:99 |
|||
#, python-format |
|||
msgid "Only images from ir.attachment are supported when exporting help pages" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#. openerp-web |
|||
#: code:addons/help_online/static/src/js/help_online.js:37 |
|||
#, python-format |
|||
msgid "Page does not exist. Do you want to create?" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_import_help_wizard_source_file |
|||
msgid "Source File" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db: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 "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db: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 "" |
|||
|
|||
#. module: help_online |
|||
#: code:addons/help_online/wizards/export_help_wizard.py:332 |
|||
#, python-format |
|||
msgid "Unable to write autobackup file in given directory: %s" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.view_view_search |
|||
msgid "Website Page" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.view_view_form |
|||
msgid "Website Page?" |
|||
msgstr "" |
|||
|
|||
#. 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 "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model.fields,field_description:help_online.field_export_help_wizard_data |
|||
msgid "XML" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model,name:help_online.model_help_online |
|||
msgid "help.online" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model,name:help_online.model_import_help_wizard |
|||
msgid "import.help.wizard" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.model,name:help_online.model_ir_model_data |
|||
msgid "ir.model.data" |
|||
msgstr "" |
|||
|
|||
#. module: help_online |
|||
#: model:ir.ui.view,arch_db:help_online.export_help_wizard_view |
|||
#: model:ir.ui.view,arch_db:help_online.import_help_wizard_view |
|||
msgid "or" |
|||
msgstr "" |
@ -1,24 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Authors: Nemry Jonathan |
|||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import help_online |
|||
from . import export_help_wizard |
|||
from . import import_help_wizard |
|||
from . import ir_model |
@ -1,49 +0,0 @@ |
|||
# -*- 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
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) |
@ -1,12 +1,3 @@ |
|||
li.oe_help_online_not_found { |
|||
a.o_help_online_not_found { |
|||
background-color: #df3f3f; |
|||
} |
|||
|
|||
.openerp .oe_view_manager .oe_view_manager_switch .oe_list_button_help_online:after { |
|||
font-size: 28px; |
|||
content: "?"; |
|||
text-align: center; |
|||
margin: 3px auto 4px; |
|||
position: relative; |
|||
display: inline-block; |
|||
} |
@ -1,21 +0,0 @@ |
|||
(function () { |
|||
'use strict'; |
|||
|
|||
var website = openerp.website; |
|||
var _t = openerp._t; |
|||
website.RTE.include({ |
|||
_config: function () { |
|||
// add anchor button
|
|||
var config = this._super(); |
|||
config.plugins = config.plugins.concat(',link'); |
|||
_.each(config.toolbar, function (tb) { |
|||
if (tb.name === 'span'){ |
|||
tb.items.unshift('Anchor'); |
|||
} |
|||
}); |
|||
return config; |
|||
}, |
|||
}); |
|||
})(); |
|||
|
|||
|
@ -1,13 +1,36 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<templates> |
|||
<t t-name='HelpOnline.Buttons'> |
|||
<div class='oe_help_online_buttons'> |
|||
<ul class='oe_view_manager_switch oe_button_group oe_right'> |
|||
<li class='oe_i'> |
|||
<a class='oe_list_button_help_online' |
|||
t-att-title='url_info.title' |
|||
t-att-href='url_info.url' target='_blank'></a> |
|||
</li> |
|||
</ul> |
|||
<t t-name='HelpOnline.Button'> |
|||
<t t-if='url_info'> |
|||
<a t-att-class="'fa fa-question-circle btn btn-icon o_help_online_button ' + (url_info.exists? '': 'o_help_online_not_found')" |
|||
t-att-title='url_info.title' t-att-href='url_info.url' |
|||
target='_blank'></a> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-name='HelpOnline.ButtonsContainer'> |
|||
<div class='hidden-xs btn-group btn-group-sm o_help_online_buttons'> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-extend="ControlPanel"> |
|||
<t t-jquery="div.o_cp_switch_buttons" t-operation="after"> |
|||
<t t-call='HelpOnline.ButtonsContainer' /> |
|||
</t> |
|||
<t t-jquery="div.oe-cp-switch-buttons" t-operation="after"> |
|||
<t t-call='HelpOnline.ButtonsContainer' /> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-extend="X2ManyControlPanel"> |
|||
<t t-jquery="div.o_cp_pager" t-operation="after"> |
|||
<t t-call='HelpOnline.ButtonsContainer' /> |
|||
</t> |
|||
<t t-jquery="div.oe-cp-pager" t-operation="after"> |
|||
<div class="pull-right"> |
|||
<t t-call='HelpOnline.ButtonsContainer' /> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
|
|||
</templates> |
@ -1,27 +1,7 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from . import test_export_help_wizard |
|||
|
|||
fast_suite = [ |
|||
] |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
checks = [ |
|||
test_export_help_wizard, |
|||
] |
|||
from . import test_help_online |
|||
from . import test_export_help_wizard |
|||
from . import test_import_help_wizard |
@ -0,0 +1,100 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
import os |
|||
import sys |
|||
from lxml import etree as ET |
|||
|
|||
from openerp.tools.convert import convert_xml_import |
|||
|
|||
|
|||
class TestWizardCommon(object): |
|||
_data_files = ('data/help_test_data.xml',) |
|||
|
|||
_module_ns = 'help_online' |
|||
|
|||
def createPage(self, pageName, imgXmlId=False): |
|||
imgId = False |
|||
if imgXmlId: |
|||
imgId = self.ref(imgXmlId) |
|||
|
|||
rootNode = ET.Element('t') |
|||
rootNode.attrib['name'] = pageName |
|||
rootNode.attrib['t-name'] = "website.%s" % pageName |
|||
tNode = ET.SubElement(rootNode, |
|||
't', |
|||
attrib={'t-call': 'website.layout'}) |
|||
structDivNode = ET.SubElement(tNode, |
|||
'div', |
|||
attrib={'class': 'oe_structure oe_empty', |
|||
'id': 'wrap'}) |
|||
sectionNode = ET.SubElement(structDivNode, |
|||
'section', |
|||
attrib={'class': 'mt16 mb16'}) |
|||
containerNode = ET.SubElement(sectionNode, |
|||
'div', |
|||
attrib={'class': 'container'}) |
|||
rowNode = ET.SubElement(containerNode, |
|||
'div', |
|||
attrib={'class': 'row'}) |
|||
bodyDivNode = ET.SubElement(rowNode, |
|||
'div', |
|||
attrib={'class': 'col-md-12 ' |
|||
'text-center mt16 mb32'}) |
|||
style = "font-family: 'Helvetica Neue', Helvetica,"\ |
|||
" Arial, sans-serif; color: rgb(51, 51, 51);"\ |
|||
" text-align: left;" |
|||
h2Node = ET.SubElement(bodyDivNode, |
|||
'h2', |
|||
attrib={'style': style}) |
|||
h2Node.text = "Test Sample Title" |
|||
if imgId: |
|||
imgDivNode = ET.SubElement(bodyDivNode, |
|||
'div', |
|||
attrib={'style': 'text-align: left;'}) |
|||
src = "/website/image?field=datas&"\ |
|||
"model=ir.attachment&id=%s" % str(imgId) |
|||
ET.SubElement(imgDivNode, |
|||
'img', |
|||
attrib={'class': 'img-thumbnail', |
|||
'src': src}) |
|||
imgDivNode = ET.SubElement(bodyDivNode, |
|||
'div', |
|||
attrib={'style': 'text-align: left;'}) |
|||
src = "/website/image/ir.attachment/%s_ccc838d/datas" % str(imgId) |
|||
ET.SubElement(imgDivNode, |
|||
'img', |
|||
attrib={'class': 'img-thumbnail', |
|||
'src': src}) |
|||
imgDivNode = ET.SubElement(bodyDivNode, |
|||
'div', |
|||
attrib={'style': 'text-align: left;'}) |
|||
src = "/web/image/%s" % str(imgId) |
|||
ET.SubElement(imgDivNode, |
|||
'img', |
|||
attrib={'class': 'img-thumbnail', |
|||
'src': src}) |
|||
arch = ET.tostring(rootNode, encoding='utf-8', xml_declaration=False) |
|||
vals = { |
|||
'name': pageName, |
|||
'type': 'qweb', |
|||
'arch': arch, |
|||
'page': True, |
|||
} |
|||
view_id = self.env['ir.ui.view'].create(vals) |
|||
return view_id.id |
|||
|
|||
def setUp(self): |
|||
super(TestWizardCommon, self).setUp() |
|||
self.pageName = False |
|||
self.imgXmlId = False |
|||
self.pageTemplate = False |
|||
# Loads the data file before |
|||
module = sys.modules[self.__class__.__module__] |
|||
base_path = os.path.dirname(module.__file__) |
|||
for path in self._data_files: |
|||
path = path.split('/') |
|||
path.insert(0, base_path) |
|||
path = os.path.join(*path) |
|||
convert_xml_import(self.cr, self._module_ns, path) |
@ -0,0 +1,58 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
import mock |
|||
|
|||
import openerp.tests.common as common |
|||
from .common import TestWizardCommon |
|||
|
|||
|
|||
class TestHelpOnline(TestWizardCommon, common.TransactionCase): |
|||
|
|||
def test_get_page_url(self): |
|||
model = 'res.partner' |
|||
help_online = self.env['help.online'] |
|||
user = self.env.user |
|||
group_writer = self.env.ref('help_online.help_online_group_writer') |
|||
group_reader = self.env.ref('help_online.help_online_group_reader') |
|||
self.assertTrue(user.has_group('help_online.help_online_group_writer')) |
|||
with mock.patch('openerp.addons.website.models.website' |
|||
'.website.search_pages') as search_pages: |
|||
# The expected page dosn't exist |
|||
search_pages.return_value = [] |
|||
info = help_online.get_page_url(model, 'form') |
|||
self.assertDictEqual( |
|||
{'exists': False, |
|||
'title': 'Create Help page for Partner', |
|||
'url': 'website/add/help-res-partner'}, info, |
|||
"If the user is member of help_online_group_writer " |
|||
"and the page doesn't exist, the module should return an url " |
|||
"to create the page") |
|||
# remove user of group writer. |
|||
group_writer.write({'users': [(3, self.env.user.id)]}) |
|||
info = help_online.get_page_url(model, 'form') |
|||
self.assertDictEqual( |
|||
{}, info, |
|||
"If the user is not member of help_online_group_writer " |
|||
"and the page doesn't exist, the module should return an " |
|||
"empty dict") |
|||
# The expected page exists |
|||
search_pages.return_value = [{'loc': 'pages/help-res-partner'}] |
|||
self.assertTrue( |
|||
user.has_group('help_online.help_online_group_reader')) |
|||
info = help_online.get_page_url(model, 'form') |
|||
self.assertDictEqual( |
|||
{'exists': True, |
|||
'title': 'Help on Partner', |
|||
'url': 'pages/help-res-partner#form'}, info, |
|||
"If the user is member of help_online_group_reader " |
|||
"and the page exists, the module should return an url " |
|||
"to the page") |
|||
# remove user from group reader |
|||
group_reader.write({'users': [(3, self.env.user.id)]}) |
|||
info = help_online.get_page_url(model, 'form') |
|||
self.assertDictEqual( |
|||
{}, info, |
|||
"If the user is not member of help_online_group_reader " |
|||
"and the page exists, the module should return an empty dict") |
@ -0,0 +1,59 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
import base64 |
|||
|
|||
import openerp.tests.common as common |
|||
from .common import TestWizardCommon |
|||
|
|||
|
|||
class TestImportHelpWizard(TestWizardCommon, common.TransactionCase): |
|||
|
|||
def setUp(self): |
|||
super(TestImportHelpWizard, self).setUp() |
|||
self.page_name = "export_import_help" |
|||
self.img_xml_id = '%s.test_img_1' % self._module_ns |
|||
self.img_name = self.env.ref(self.img_xml_id).name |
|||
self.ir_attchement = self.env['ir.attachment'] |
|||
self.ir_ui_view = self.env['ir.ui.view'] |
|||
self.export_help_wizard = self.env['export.help.wizard'] |
|||
self.import_help_wizard = self.env['import.help.wizard'] |
|||
|
|||
def _do_check_resources(self, expected=1): |
|||
pages = self.ir_ui_view.search([('name', '=', self.page_name)]) |
|||
self.assertEqual(expected, len(pages)) |
|||
attachments = self.ir_attchement.search( |
|||
[('name', '=', self.img_name)]) |
|||
self.assertEqual(expected, len(attachments)) |
|||
|
|||
def test_import_help(self): |
|||
self.createPage(pageName=self.page_name, imgXmlId=self.img_xml_id) |
|||
self._do_check_resources() |
|||
wizard = self.export_help_wizard.create({}) |
|||
wizard.export_help() |
|||
xmlData = base64.decodestring(wizard.data) |
|||
self.env.ref(self.img_xml_id).unlink() |
|||
self.ir_ui_view.search([('name', '=', self.page_name)]).unlink() |
|||
self._do_check_resources(0) |
|||
wizard = self.import_help_wizard.create({ |
|||
'source_file': base64.encodestring(xmlData) |
|||
}) |
|||
wizard.import_help() |
|||
self._do_check_resources() |
|||
|
|||
def test_import_export_help(self): |
|||
"""Check that exported data are not ducplicated by export / import |
|||
""" |
|||
self.createPage(pageName=self.page_name, imgXmlId=self.img_xml_id) |
|||
self._do_check_resources() |
|||
# export |
|||
wizard = self.export_help_wizard.create({}) |
|||
wizard.export_help() |
|||
xmlData = base64.decodestring(wizard.data) |
|||
self._do_check_resources() |
|||
wizard = self.import_help_wizard.create({ |
|||
'source_file': base64.encodestring(xmlData) |
|||
}) |
|||
wizard.import_help() |
|||
self._do_check_resources() |
@ -1,52 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record model="ir.ui.view" id="export_help_wizard_view"> |
|||
<field name="name">export.help.wizard.view</field> |
|||
<field name="model">export.help.wizard</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Export Help Data"> |
|||
<group colspan="2"> |
|||
<field name="export_filename" |
|||
invisible="1"/> |
|||
</group> |
|||
<group> |
|||
<p> |
|||
This wizard allow you to export all QWeb views |
|||
related to help online. The result will be an Odoo |
|||
data xml file. |
|||
</p> |
|||
</group> |
|||
<group> |
|||
<field name="data" |
|||
nolabel="1" |
|||
readonly="1" |
|||
filename="export_filename" /> |
|||
</group> |
|||
<footer> |
|||
<span name="go-wizard" attrs="{'invisible': [('export_filename', '!=', False)]}"> |
|||
<button name="export_help" |
|||
string="Export" |
|||
type="object" |
|||
icon="gtk-execute" |
|||
class="oe_highlight" /> |
|||
or |
|||
</span> |
|||
<button string="Close" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.actions.act_window" id="action_export_help_wizard"> |
|||
<field name="name">Export Help</field> |
|||
<field name="res_model">export.help.wizard</field> |
|||
<field name="view_id" ref="export_help_wizard_view"/> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -1,46 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record model="ir.ui.view" id="import_help_wizard_view"> |
|||
<field name="name">import.help.wizard.view</field> |
|||
<field name="model">import.help.wizard</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Import Help Data"> |
|||
<group> |
|||
<p> |
|||
This wizard allow you to import QWeb views |
|||
related to help online. The required file format is an Odoo |
|||
data xml file. |
|||
</p> |
|||
</group> |
|||
<group> |
|||
<field name="source_file"/> |
|||
</group> |
|||
<footer> |
|||
<span name="go-wizard" attrs="{'invisible': [('source_file', '=', False)]}"> |
|||
<button name="import_help" |
|||
string="Import" |
|||
type="object" |
|||
icon="gtk-execute" |
|||
class="oe_highlight" /> |
|||
or |
|||
</span> |
|||
<button string="Close" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.actions.act_window" id="action_import_help_wizard"> |
|||
<field name="name">Import Help</field> |
|||
<field name="res_model">import.help.wizard</field> |
|||
<field name="view_id" ref="import_help_wizard_view"/> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -1,12 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<template id="assets_editor" inherit_id="website.assets_editor" name="Help online customization"> |
|||
<xpath expr="." position="inside"> |
|||
<script type="text/javascript" src="/help_online/static/src/js/website_help_online.editor.js" groups="base.group_website_publisher"></script> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import export_help_wizard |
|||
from . import import_help_wizard |
@ -0,0 +1,50 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record model="ir.ui.view" id="export_help_wizard_view"> |
|||
<field name="name">export.help.wizard.view</field> |
|||
<field name="model">export.help.wizard</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Export Help Data"> |
|||
<group colspan="2"> |
|||
<field name="export_filename" |
|||
invisible="1"/> |
|||
</group> |
|||
<group> |
|||
<p> |
|||
This wizard allow you to export all QWeb views |
|||
related to help online. The result will be an Odoo |
|||
data xml file. |
|||
</p> |
|||
</group> |
|||
<group> |
|||
<field name="data" |
|||
nolabel="1" |
|||
readonly="1" |
|||
filename="export_filename" /> |
|||
</group> |
|||
<footer> |
|||
<span name="go-wizard" attrs="{'invisible': [('export_filename', '!=', False)]}"> |
|||
<button name="export_help" |
|||
string="Export" |
|||
type="object" |
|||
icon="gtk-execute" |
|||
class="oe_highlight" /> |
|||
or |
|||
</span> |
|||
<button string="Close" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.actions.act_window" id="action_export_help_wizard"> |
|||
<field name="name">Export Help</field> |
|||
<field name="res_model">export.help.wizard</field> |
|||
<field name="view_id" ref="export_help_wizard_view"/> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,53 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
import base64 |
|||
from cStringIO import StringIO |
|||
from lxml import etree |
|||
import logging |
|||
import os |
|||
|
|||
from openerp import api, fields, models |
|||
from openerp.tools import convert, misc |
|||
from openerp.tools.config import config |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class XmlImport(convert.xml_import): |
|||
"""Override base xml_import to be able to import record with an exported |
|||
xml_id ('__export__.XXX-XXX') |
|||
""" |
|||
|
|||
def _test_xml_id(self, xml_id): |
|||
if '.' in xml_id: |
|||
module, _id = xml_id.split('.') |
|||
if module == '__export__': |
|||
return True |
|||
super(XmlImport, self)._test_xml_id(xml_id) |
|||
|
|||
|
|||
class ImportHelpWizard(models.TransientModel): |
|||
_name = "import.help.wizard" |
|||
|
|||
source_file = fields.Binary('Source File') |
|||
|
|||
@api.multi |
|||
def import_help(self): |
|||
for this in self: |
|||
xmlfile = StringIO(base64.decodestring(this.source_file)) |
|||
doc = etree.parse(xmlfile) |
|||
relaxng = etree.RelaxNG( |
|||
etree.parse( |
|||
os.path.join(config['root_path'], 'import_xml.rng'))) |
|||
try: |
|||
relaxng.assert_(doc) |
|||
except Exception: |
|||
_logger.info('The XML file does not fit the required schema !', |
|||
exc_info=True) |
|||
_logger.info(misc.ustr(relaxng.error_log.last_error)) |
|||
raise |
|||
obj = XmlImport(self.env.cr, self._module, idref={}, mode='init', |
|||
report=None, noupdate=False, xml_filename=None) |
|||
obj.parse(doc.getroot(), mode='init') |
@ -0,0 +1,43 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record model="ir.ui.view" id="import_help_wizard_view"> |
|||
<field name="name">import.help.wizard.view</field> |
|||
<field name="model">import.help.wizard</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Import Help Data"> |
|||
<group> |
|||
<p> |
|||
This wizard allow you to import QWeb views |
|||
related to help online. The required file format is an Odoo |
|||
data xml file. |
|||
</p> |
|||
</group> |
|||
<group> |
|||
<field name="source_file"/> |
|||
</group> |
|||
<footer> |
|||
<span name="go-wizard" attrs="{'invisible': [('source_file', '=', False)]}"> |
|||
<button name="import_help" |
|||
string="Import" |
|||
type="object" |
|||
icon="gtk-execute" |
|||
class="oe_highlight" /> |
|||
or |
|||
</span> |
|||
<button string="Close" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.actions.act_window" id="action_import_help_wizard"> |
|||
<field name="name">Import Help</field> |
|||
<field name="res_model">import.help.wizard</field> |
|||
<field name="view_id" ref="import_help_wizard_view"/> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1 @@ |
|||
__import__('pkg_resources').declare_namespace(__name__) |
@ -0,0 +1 @@ |
|||
../../../help_online |
@ -0,0 +1,6 @@ |
|||
import setuptools |
|||
|
|||
setuptools.setup( |
|||
setup_requires=['setuptools-odoo'], |
|||
odoo_addon=True, |
|||
) |
@ -0,0 +1 @@ |
|||
__import__('pkg_resources').declare_namespace(__name__) |
@ -0,0 +1 @@ |
|||
../../../web_menu_collapsible |
@ -0,0 +1,6 @@ |
|||
import setuptools |
|||
|
|||
setuptools.setup( |
|||
setup_requires=['setuptools-odoo'], |
|||
odoo_addon=True, |
|||
) |
@ -0,0 +1,67 @@ |
|||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
================ |
|||
Collapsible menu |
|||
================ |
|||
|
|||
This module makes all menus collapsible for all users. |
|||
|
|||
Second level menus are collapsed by default. |
|||
|
|||
.. image:: /web_menu_collapsible/static/description/menu_collapsible_1.png |
|||
:alt: In case first level menu is collapsed, click it to expand. |
|||
|
|||
.. image:: /web_menu_collapsible/static/description/menu_collapsible_2.png |
|||
:alt: In case first level menu is expanded, click it to collapse. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
No configuration is needed. |
|||
|
|||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|||
:alt: Try me on Runbot |
|||
:target: https://runbot.odoo-community.org/runbot/162/9.0 |
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
* The visual hint is initially in state 'collapsed' when is actually 'expanded' (this is Odoo's menu standard mechanism). |
|||
|
|||
Bug Tracker |
|||
=========== |
|||
|
|||
Bugs are tracked on `GitHub Issues |
|||
<https://github.com/OCA/162/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. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Images |
|||
------ |
|||
|
|||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Dennis Sluijk <d.sluijk@onestein.nl> |
|||
|
|||
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 https://odoo-community.org. |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Onestein (<http://www.onestein.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
@ -0,0 +1,18 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Onestein (<http://www.onestein.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
'name': 'Collapsible menu', |
|||
'license': 'AGPL-3', |
|||
'images': [], |
|||
'summary': 'Foldable second level Odoo menu', |
|||
'author': 'Onestein,Odoo Community Association (OCA)', |
|||
'website': 'http://www.onestein.eu', |
|||
'category': 'Web', |
|||
'version': '9.0.1.0.0', |
|||
'depends': ['web'], |
|||
'data': [ |
|||
'templates/menu_collapsible.xml', |
|||
], |
|||
} |
After Width: 128 | Height: 128 | Size: 9.2 KiB |
After Width: 214 | Height: 446 | Size: 34 KiB |
After Width: 214 | Height: 273 | Size: 18 KiB |
@ -0,0 +1,43 @@ |
|||
.oe_secondary_menu_section { |
|||
height: 26px; |
|||
cursor: pointer; |
|||
-webkit-user-select: none; |
|||
-moz-user-select: none; |
|||
-ms-user-select: none; |
|||
user-select: none; |
|||
} |
|||
|
|||
.oe_secondary_menu_section.oe_menu_toggler { |
|||
margin-left: 18px; |
|||
} |
|||
|
|||
.oe_secondary_submenu > li > a.oe_menu_leaf, |
|||
.oe_secondary_submenu > li > a.oe_menu_toggler { |
|||
padding-left: 27px; |
|||
} |
|||
|
|||
.oe_secondary_menu_section.oe_menu_toggler::before { |
|||
width: 0; |
|||
height: 0; |
|||
display: inline-block; |
|||
content: "&darr"; |
|||
text-indent: -99999px; |
|||
vertical-align: top; |
|||
margin-left: -12px; |
|||
margin-top: 4px; |
|||
margin-right: 4px; |
|||
border-top: 4px solid transparent; |
|||
border-bottom: 4px solid transparent; |
|||
border-left: 4px solid #4c4c4c; |
|||
filter: alpha(opacity=50); |
|||
opacity: 0.5; |
|||
} |
|||
|
|||
.oe_secondary_menu_section.oe_menu_toggler.oe_menu_opened::before { |
|||
margin-top: 6px; |
|||
margin-left: -16px; |
|||
margin-right: 4px; |
|||
border-left: 4px solid transparent; |
|||
border-right: 4px solid transparent; |
|||
border-top: 4px solid #4c4c4c; |
|||
} |
@ -0,0 +1,23 @@ |
|||
odoo.define('web_menu_collapsible.Menu', function(require) { |
|||
"use strict"; |
|||
var $ = require('$'), |
|||
Menu = require('web.Menu'); |
|||
|
|||
Menu.include({ |
|||
start: function() { |
|||
var self = this; |
|||
$(".oe_secondary_submenu").hide(); |
|||
$(".oe_secondary_menu_section").each(function() { |
|||
if($(this).next().hasClass('oe_secondary_submenu')) { |
|||
$(this).unbind("click"); |
|||
$(this).click(self.section_clicked); |
|||
$(this).addClass('oe_menu_toggler'); |
|||
} |
|||
}); |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
section_clicked: function() { |
|||
$(this).toggleClass('oe_menu_opened').next().toggle(); |
|||
} |
|||
}); |
|||
}); |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<template id="assets_backend_menu_collapsible" name="assets.backend.menu.collapsible" inherit_id="web.assets_backend"> |
|||
<xpath expr="." position="inside"> |
|||
<link rel="stylesheet" href="/web_menu_collapsible/static/src/css/menu_collapsible.css" /> |
|||
<script type="text/javascript" src="/web_menu_collapsible/static/src/js/menu_collapsible.js"></script> |
|||
</xpath> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,94 @@ |
|||
/* Copyright 2016 Ponto Suprimentos Ltda. |
|||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ |
|||
|
|||
.openerp .oe_formview .oe_form { |
|||
// Form must fill 100% width in any size |
|||
.oe_form_sheetbg { |
|||
padding: 16px; |
|||
|
|||
.oe_form_sheet_width { |
|||
min-width: auto; |
|||
max-width: 100%; |
|||
} |
|||
|
|||
@media (max-width: @screen-sm-max) { |
|||
padding: 0; |
|||
|
|||
.oe_form_sheet_width { |
|||
border: none; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// No overflowing buttons or titles |
|||
.oe_button_box, .oe_title { |
|||
max-width: 100%; |
|||
} |
|||
|
|||
@media (max-width: @screen-sm-max) { |
|||
.oe_form_field > .ui-autocomplete-input { |
|||
width: 80%; |
|||
} |
|||
|
|||
.oe_form_group_row .oe_form_group_row { |
|||
margin: 0; |
|||
} |
|||
|
|||
.oe_form_group, .oe_form_group_row, .oe_form_group_cell { |
|||
&, & tbody { |
|||
display: block; |
|||
margin-top: 8px; |
|||
width: 100%; |
|||
} |
|||
|
|||
&.oe_group_right { |
|||
padding: 0; |
|||
} |
|||
|
|||
.oe_form_group_row { |
|||
display: table; |
|||
} |
|||
|
|||
.oe_form_group_cell { |
|||
margin: 0; |
|||
width: 100%; |
|||
} |
|||
|
|||
.oe_form_group_cell_label { |
|||
@media (min-width: @screen-sm-min) { |
|||
display: table-cell; |
|||
min-width: 30%; |
|||
width: 30%; |
|||
} |
|||
|
|||
@media (max-width: @screen-xs-max) { |
|||
border: none; |
|||
} |
|||
|
|||
+ .oe_form_group_cell { |
|||
@media (min-width: @screen-sm-min) { |
|||
display: table-cell; |
|||
max-width: 70%; |
|||
width: 70%; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
// Make image editing controls always available, instead of depending on |
|||
// resolution or hover |
|||
.oe_form_field_image > .oe_form_field_image_controls { |
|||
display: block; |
|||
opacity: 0.7; |
|||
|
|||
.oe_hidden_input_file { |
|||
display: none; |
|||
} |
|||
} |
|||
|
|||
// Adapt chatter widget to small viewports |
|||
.oe_chatter { |
|||
min-width: inherit; |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * web_tree_dynamic_colored_field |
|||
# |
|||
# Translators: |
|||
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-05 01:38+0000\n" |
|||
"PO-Revision-Date: 2017-01-05 01:38+0000\n" |
|||
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n" |
|||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: es\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: web_tree_dynamic_colored_field |
|||
#. openerp-web |
|||
#: code:addons/web_tree_dynamic_colored_field/static/src/xml/web_tree_dynamic_colored_field.xml:7 |
|||
#, python-format |
|||
msgid "columns.fct_colorize(record, column)" |
|||
msgstr "columns.fct_colorize(record, column)" |
@ -0,0 +1,54 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * web_widget_image_webcam |
|||
# |
|||
# Translators: |
|||
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-05 01:38+0000\n" |
|||
"PO-Revision-Date: 2017-01-05 01:38+0000\n" |
|||
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n" |
|||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: es\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:98 |
|||
#, python-format |
|||
msgid "Close" |
|||
msgstr "Cerrar" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:74 |
|||
#, python-format |
|||
msgid "Save & Close" |
|||
msgstr "Guardar y cerrar" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:62 |
|||
#, python-format |
|||
msgid "Take Snapshot" |
|||
msgstr "Capturar instantánea" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml:8 |
|||
#, python-format |
|||
msgid "WebCam" |
|||
msgstr "WebCam" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:58 |
|||
#, python-format |
|||
msgid "WebCam Booth" |
|||
msgstr "Soporte de WebCam" |
@ -0,0 +1,54 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * web_widget_image_webcam |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-14 02:26+0000\n" |
|||
"PO-Revision-Date: 2017-01-14 02:26+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: fr\n" |
|||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:98 |
|||
#, python-format |
|||
msgid "Close" |
|||
msgstr "Fermer" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:74 |
|||
#, python-format |
|||
msgid "Save & Close" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:62 |
|||
#, python-format |
|||
msgid "Take Snapshot" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml:8 |
|||
#, python-format |
|||
msgid "WebCam" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:58 |
|||
#, python-format |
|||
msgid "WebCam Booth" |
|||
msgstr "" |
@ -0,0 +1,54 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * web_widget_image_webcam |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-14 02:26+0000\n" |
|||
"PO-Revision-Date: 2017-01-14 02:26+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: sl\n" |
|||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:98 |
|||
#, python-format |
|||
msgid "Close" |
|||
msgstr "Zaključi" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:74 |
|||
#, python-format |
|||
msgid "Save & Close" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:62 |
|||
#, python-format |
|||
msgid "Take Snapshot" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml:8 |
|||
#, python-format |
|||
msgid "WebCam" |
|||
msgstr "" |
|||
|
|||
#. module: web_widget_image_webcam |
|||
#. openerp-web |
|||
#: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:58 |
|||
#, python-format |
|||
msgid "WebCam Booth" |
|||
msgstr "" |
@ -0,0 +1,27 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * web_x2many_delete_all |
|||
# |
|||
# Translators: |
|||
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-01-05 01:38+0000\n" |
|||
"PO-Revision-Date: 2017-01-05 01:38+0000\n" |
|||
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n" |
|||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: es\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: web_x2many_delete_all |
|||
#. openerp-web |
|||
#: code:addons/web_x2many_delete_all/static/src/xml/web_x2many_delete_all.xml:8 |
|||
#: code:addons/web_x2many_delete_all/static/src/xml/web_x2many_delete_all.xml:13 |
|||
#, python-format |
|||
msgid "Delete all" |
|||
msgstr "Eliminar todo" |
Write
Preview
Loading…
Cancel
Save
Reference in new issue