Browse Source

[MIG] Migrate help_online module from v10.0 to v11.0

pull/874/head
Quentin Theuret 6 years ago
parent
commit
c894c439a8
  1. 2
      help_online/README.rst
  2. 1
      help_online/__init__.py
  3. 7
      help_online/__manifest__.py
  4. 1
      help_online/controllers/__init__.py
  5. 1
      help_online/controllers/help_online_controllers.py
  6. 1
      help_online/models/__init__.py
  7. 1
      help_online/models/help_online.py
  8. 1
      help_online/models/ir_model.py
  9. 6
      help_online/static/src/css/help_online.css
  10. 2
      help_online/static/src/js/help_online.js
  11. 1
      help_online/tests/__init__.py
  12. 1
      help_online/tests/common.py
  13. 1
      help_online/tests/test_export_help_wizard.py
  14. 1
      help_online/tests/test_help_online.py
  15. 1
      help_online/tests/test_import_help_wizard.py
  16. 4
      help_online/views/ir_ui_view_view.xml
  17. 1
      help_online/wizards/__init__.py
  18. 3
      help_online/wizards/export_help_wizard.py
  19. 5
      help_online/wizards/import_help_wizard.py

2
help_online/README.rst

@ -26,7 +26,7 @@ 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/10.0
:target: https://runbot.odoo-community.org/runbot/162/11.0
Known issues / Roadmap

1
help_online/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

7
help_online/__manifest__.py

@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
# 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': '10.0.1.0.0',
'author': "ACSONE SA/NV,Odoo Community Association (OCA)",
'maintainer': 'ACSONE SA/NV',
'version': '11.0.1.0.0',
'author': "ACSONE SA/NV,Amaris,Odoo Community Association (OCA)",
'maintainer': 'ACSONE SA/NV,Amaris',
'website': 'http://www.acsone.eu',
'license': 'AGPL-3',
'category': 'Documentation',

1
help_online/controllers/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/controllers/help_online_controllers.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/models/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/models/help_online.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/models/ir_model.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

6
help_online/static/src/css/help_online.css

@ -1,3 +1,7 @@
a.o_help_online_button {
color: forestgreen;
}
a.o_help_online_not_found {
background-color: #df3f3f;
color: #df3f3f;
}

2
help_online/static/src/js/help_online.js

@ -66,7 +66,7 @@ odoo.define('oca.HelpOnline', function (require) {
control_elements.$help_online_buttons = $('<div/>');
}
var self = this;
this.rpc('/help_online/build_url', {model: this.dataset.model, view_type: this.active_view.type}).then(function(result) {
this._rpc({route: '/help_online/build_url', params: {model: this.dataset.model, view_type: this.active_view.type}}).then(function(result) {
if (result && ! _.isEmpty(result)) {
var $helpButton = self.render_help_button(result);
control_elements.$help_online_buttons = $helpButton;

1
help_online/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/tests/common.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/tests/test_export_help_wizard.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/tests/test_help_online.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

1
help_online/tests/test_import_help_wizard.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

4
help_online/views/ir_ui_view_view.xml

@ -6,7 +6,7 @@
<field name="model">ir.ui.view</field>
<field name="arch" type="xml">
<xpath expr="//filter[last()]" position="after">
<filter name="website" string="Website Page" domain="[('type', '=', 'qweb'),('page', '=', True)]"/>
<filter name="website" string="Website Page" domain="[('type', '=', 'qweb'),('page_ids', '!=', False)]"/>
</xpath>
</field>
</record>
@ -17,7 +17,7 @@
<field name="model">ir.ui.view</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="page" string="Website Page?" readonly="1" attrs="{'invisible': [('type', '!=', 'qweb')]}"/>
<field name="page_ids" string="Website Page?" readonly="1" attrs="{'invisible': [('type', '!=', 'qweb')]}"/>
</xpath>
</field>
</record>

1
help_online/wizards/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

3
help_online/wizards/export_help_wizard.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@ -6,7 +5,7 @@ import logging
import base64
import time
import copy
import urlparse
from urllib.parse import urlparse
from werkzeug.routing import Map, Rule
from lxml import etree as ET
from odoo import models, fields, api, exceptions

5
help_online/wizards/import_help_wizard.py

@ -1,9 +1,8 @@
# -*- 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 io import StringIO
from lxml import etree
import logging
import os
@ -42,7 +41,7 @@ class ImportHelpWizard(models.TransientModel):
etree.parse(
os.path.join(config['root_path'], 'import_xml.rng')))
try:
relaxng.assert_(doc)
relaxng.assertTrue(doc)
except Exception:
_logger.info('The XML file does not fit the required schema !',
exc_info=True)

Loading…
Cancel
Save