mirror of https://github.com/OCA/web.git
[10.0] help_online fix export/import (#584)
* [FIX] help_online: Replace obsolete icon into the export wizard * [FIX] help_online: Add the key attribute into the exported data This key is required to get the pages properly imported as web pages * Use the correct method for combining strings This handles type conversions properlypull/647/head
parent
37b659d832
commit
95f15c43d5
|
@ -81,6 +81,7 @@ class TestWizardCommon(object):
|
||||||
'type': 'qweb',
|
'type': 'qweb',
|
||||||
'arch': arch,
|
'arch': arch,
|
||||||
'page': True,
|
'page': True,
|
||||||
|
'key': 'website.%' % pageName
|
||||||
}
|
}
|
||||||
view_id = self.env['ir.ui.view'].create(vals)
|
view_id = self.env['ir.ui.view'].create(vals)
|
||||||
return view_id.id
|
return view_id.id
|
||||||
|
|
|
@ -31,6 +31,8 @@ class TestExportHelpWizard(TestWizardCommon):
|
||||||
templateNodeList = rootXml.findall(xPath)
|
templateNodeList = rootXml.findall(xPath)
|
||||||
self.assertEqual(len(templateNodeList), 1)
|
self.assertEqual(len(templateNodeList), 1)
|
||||||
self.assertNotIn("website.", templateNodeList[0].attrib['name'])
|
self.assertNotIn("website.", templateNodeList[0].attrib['name'])
|
||||||
|
self.assertEqual(
|
||||||
|
"website." + self.pageName, templateNodeList[0].attrib['key'])
|
||||||
|
|
||||||
if self.imgXmlId:
|
if self.imgXmlId:
|
||||||
xPath = ".//record[@id='%s']" % self.imgXmlId
|
xPath = ".//record[@id='%s']" % self.imgXmlId
|
||||||
|
|
|
@ -236,6 +236,7 @@ class ExportHelpWizard(models.TransientModel):
|
||||||
root.attrib['name'] = ir_ui_view.name.replace('website.', '')
|
root.attrib['name'] = ir_ui_view.name.replace('website.', '')
|
||||||
root.attrib['id'] = xml_id
|
root.attrib['id'] = xml_id
|
||||||
root.attrib['page'] = 'True'
|
root.attrib['page'] = 'True'
|
||||||
|
root.attrib['key'] = ir_ui_view.key
|
||||||
|
|
||||||
self._manage_images_on_page(root, data_node, exported_resources)
|
self._manage_images_on_page(root, data_node, exported_resources)
|
||||||
self._clean_href_urls(root, page_prefix, template_prefix)
|
self._clean_href_urls(root, page_prefix, template_prefix)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<button name="export_help"
|
<button name="export_help"
|
||||||
string="Export"
|
string="Export"
|
||||||
type="object"
|
type="object"
|
||||||
icon="gtk-execute"
|
icon="fa-magic"
|
||||||
class="oe_highlight" />
|
class="oe_highlight" />
|
||||||
or
|
or
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue