Browse Source

[MIG] Migrate to 10.0

pull/874/head
Laurent Mignon 8 years ago
committed by Quentin Theuret
parent
commit
b3cbaac850
  1. 4
      help_online/README.rst
  2. 3
      help_online/__manifest__.py
  3. 4
      help_online/controllers/help_online_controllers.py
  4. 4
      help_online/data/ir_config_parameter_data.xml
  5. 4
      help_online/models/help_online.py
  6. 2
      help_online/models/ir_model.py
  7. 2
      help_online/security/help_online_groups.xml
  8. 2
      help_online/tests/common.py
  9. 4
      help_online/tests/data/help_test_data.xml
  10. 2
      help_online/tests/test_export_help_wizard.py
  11. 7
      help_online/tests/test_help_online.py
  12. 2
      help_online/tests/test_import_help_wizard.py
  13. 10
      help_online/wizards/export_help_wizard.py
  14. 6
      help_online/wizards/import_help_wizard.py

4
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/9.0
:target: https://runbot.odoo-community.org/runbot/162/10.0
Known issues / Roadmap
@ -34,7 +34,7 @@ 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).
by the new html editor in Odoo 10.0 (summernote).
Bug Tracker

3
help_online/__manifest__.py

@ -4,14 +4,13 @@
{
'name': 'Help Online',
'version': '9.0.1.0.0',
'version': '10.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',
],
'data': [

4
help_online/controllers/help_online_controllers.py

@ -2,8 +2,8 @@
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import openerp.http as http
from openerp.http import request
import odoo.http as http
from odoo.http import request
class HelpOnlineController(http.Controller):

4
help_online/data/ir_config_parameter_data.xml

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' ?>
<openerp>
<odoo>
<data noupdate="1">
<record id="help_online_autobackup_path" model="ir.config_parameter">
@ -22,4 +22,4 @@
</record>
</data>
</openerp>
</odoo>

4
help_online/models/help_online.py

@ -2,8 +2,8 @@
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, exceptions
from openerp.tools.translate import _
from odoo import models, exceptions
from odoo.tools.translate import _
class HelpOnline(models.TransientModel):

2
help_online/models/ir_model.py

@ -2,7 +2,7 @@
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, api
from odoo import models, api
from lxml import etree as ET

2
help_online/security/help_online_groups.xml

@ -9,7 +9,7 @@
<field name="category_id" ref="base.module_category_documentation"/>
<field name="implied_ids" eval="[
(4, ref('help_online_group_reader')),
(4, ref('base.group_website_publisher')),
(4, ref('website.group_website_publisher')),
]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

2
help_online/tests/common.py

@ -6,7 +6,7 @@ import os
import sys
from lxml import etree as ET
from openerp.tools.convert import convert_xml_import
from odoo.tools.convert import convert_xml_import
class TestWizardCommon(object):

4
help_online/tests/data/help_test_data.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>
<data>
<record id="test_img_1" model="ir.attachment">
<field name="datas">iVBORw0KGgoAAAANSUhEUgAAANwAAAAzCAIAAABzKvGBAAAOOUlEQVR42u1beVRU5xWfYcZh3wao
@ -75,4 +75,4 @@ YFBaQ6YYbTbt679Y0nIRIfKXS1d/8J7oqRWRGxO2b92S+NyzK2n3aAwoCf/7jpEfsQAoxU3nESI/
<field name="mimetype">image/png</field>
</record>
</data>
</openerp>
</odoo>

2
help_online/tests/test_export_help_wizard.py

@ -5,7 +5,7 @@
import base64
from lxml import etree as ET
import openerp.tests.common as common
import odoo.tests.common as common
from .common import TestWizardCommon

7
help_online/tests/test_help_online.py

@ -4,7 +4,7 @@
import mock
import openerp.tests.common as common
import odoo.tests.common as common
from .common import TestWizardCommon
@ -17,8 +17,9 @@ class TestHelpOnline(TestWizardCommon, common.TransactionCase):
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:
website = self.env['website']
with mock.patch.object(website.__class__,
'search_pages') as search_pages:
# The expected page dosn't exist
search_pages.return_value = []
info = help_online.get_page_url(model, 'form')

2
help_online/tests/test_import_help_wizard.py

@ -4,7 +4,7 @@
import base64
import openerp.tests.common as common
import odoo.tests.common as common
from .common import TestWizardCommon

10
help_online/wizards/export_help_wizard.py

@ -9,10 +9,10 @@ import copy
import urlparse
from werkzeug.routing import Map, Rule
from lxml import etree as ET
from openerp import models, fields, api, exceptions
from openerp.tools.translate import _
from openerp.addons.web.controllers.main import Binary
from openerp.addons.website.controllers.main import WebsiteBinary
from odoo import models, fields, api, exceptions
from odoo.tools.translate import _
from odoo.addons.web.controllers.main import Binary
from odoo.addons.website.controllers.main import WebsiteBinary
_logger = logging.getLogger(__name__)
@ -224,7 +224,7 @@ class ExportHelpWizard(models.TransientModel):
('name', 'like', '%s%%' % template_prefix)]
ir_ui_views = self.env['ir.ui.view'].search(domain, order='name')
xml_to_export = ET.Element('openerp')
xml_to_export = ET.Element('odoo')
data_node = ET.SubElement(xml_to_export, 'data')
exported_resources = set()
for ir_ui_view in ir_ui_views:

6
help_online/wizards/import_help_wizard.py

@ -8,9 +8,9 @@ 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
from odoo import api, fields, models
from odoo.tools import convert, misc
from odoo.tools.config import config
_logger = logging.getLogger(__name__)

Loading…
Cancel
Save