diff --git a/help_online/tests/test_export_help_wizard.py b/help_online/tests/test_export_help_wizard.py index fb0ec1f2..933ca3cb 100644 --- a/help_online/tests/test_export_help_wizard.py +++ b/help_online/tests/test_export_help_wizard.py @@ -27,7 +27,7 @@ class TestExportHelpWizard(TestWizardCommon): parser = ET.XMLParser(remove_blank_text=True) rootXml = ET.XML(xmlData, parser=parser) - xPath = ".//template[@id='website.%s']" % self.pageName + xPath = ".//template[@id='__export__.%s']" % self.pageName templateNodeList = rootXml.findall(xPath) self.assertEqual(len(templateNodeList), 1) self.assertNotIn("website.", templateNodeList[0].attrib['name']) @@ -47,7 +47,7 @@ class TestExportHelpWizard(TestWizardCommon): self.assertIn("/web/image/%s" % self.imgXmlId, imgSrc) if self.pageTemplate: - xPath = ".//template[@id='website.%s_snippet']" % self.pageName + xPath = ".//template[@id='__export__.%s_snippet']" % self.pageName templateNodeList = rootXml.findall(xPath) self.assertEqual(len(templateNodeList), 1) self.assertNotIn("website.", templateNodeList[0].attrib['name']) diff --git a/help_online/wizards/export_help_wizard.py b/help_online/wizards/export_help_wizard.py index aad0f08d..e7c7da91 100644 --- a/help_online/wizards/export_help_wizard.py +++ b/help_online/wizards/export_help_wizard.py @@ -271,6 +271,10 @@ class ExportHelpWizard(models.TransientModel): return data[0].name else: module, name = template_name.split('.') + # always use __export__ as module by convention to + # avoid the removal by odoo of the exported pages on system + # update (-u ) + module = "__export__" postfix = ir_model_data.search_count( [('module', '=', module), ('name', 'like', name)])