[FIX] help_online: Add the key attribute into the exported data

This key is required to get the pages properly imported as web pages
pull/649/head
Laurent Mignon 2017-03-17 14:06:24 +01:00 committed by Jairo Llopis
parent e83c63fc91
commit c8cc759b41
3 changed files with 4 additions and 0 deletions

View File

@ -81,6 +81,7 @@ class TestWizardCommon(object):
'type': 'qweb',
'arch': arch,
'page': True,
'key': 'website.' + pageName
}
view_id = self.env['ir.ui.view'].create(vals)
return view_id.id

View File

@ -31,6 +31,8 @@ class TestExportHelpWizard(TestWizardCommon):
templateNodeList = rootXml.findall(xPath)
self.assertEqual(len(templateNodeList), 1)
self.assertNotIn("website.", templateNodeList[0].attrib['name'])
self.assertEqual(
"website." + self.pageName, templateNodeList[0].attrib['key'])
if self.imgXmlId:
xPath = ".//record[@id='%s']" % self.imgXmlId

View File

@ -236,6 +236,7 @@ class ExportHelpWizard(models.TransientModel):
root.attrib['name'] = ir_ui_view.name.replace('website.', '')
root.attrib['id'] = xml_id
root.attrib['page'] = 'True'
root.attrib['key'] = ir_ui_view.key
self._manage_images_on_page(root, data_node, exported_resources)
self._clean_href_urls(root, page_prefix, template_prefix)