|
@ -58,7 +58,7 @@ class test_export_help_wizard(object): |
|
|
attrib={'class': 'row'}) |
|
|
attrib={'class': 'row'}) |
|
|
bodyDivNode = ET.SubElement(rowNode, |
|
|
bodyDivNode = ET.SubElement(rowNode, |
|
|
'div', |
|
|
'div', |
|
|
attrib={'class': 'col-md-12 '\ |
|
|
|
|
|
|
|
|
attrib={'class': 'col-md-12 ' |
|
|
'text-center mt16 mb32'}) |
|
|
'text-center mt16 mb32'}) |
|
|
style = "font-family: 'Helvetica Neue', Helvetica,"\ |
|
|
style = "font-family: 'Helvetica Neue', Helvetica,"\ |
|
|
" Arial, sans-serif; color: rgb(51, 51, 51);"\ |
|
|
" Arial, sans-serif; color: rgb(51, 51, 51);"\ |
|
@ -73,18 +73,18 @@ class test_export_help_wizard(object): |
|
|
attrib={'style': 'text-align: left;'}) |
|
|
attrib={'style': 'text-align: left;'}) |
|
|
src = "/website/image?field=datas&"\ |
|
|
src = "/website/image?field=datas&"\ |
|
|
"model=ir.attachment&id=%s" % str(imgId) |
|
|
"model=ir.attachment&id=%s" % str(imgId) |
|
|
imgNode = ET.SubElement(imgDivNode, |
|
|
|
|
|
'img', |
|
|
|
|
|
attrib={'class': 'img-thumbnail', |
|
|
|
|
|
'src': src}) |
|
|
|
|
|
|
|
|
ET.SubElement(imgDivNode, |
|
|
|
|
|
'img', |
|
|
|
|
|
attrib={'class': 'img-thumbnail', |
|
|
|
|
|
'src': src}) |
|
|
imgDivNode = ET.SubElement(bodyDivNode, |
|
|
imgDivNode = ET.SubElement(bodyDivNode, |
|
|
'div', |
|
|
'div', |
|
|
attrib={'style': 'text-align: left;'}) |
|
|
attrib={'style': 'text-align: left;'}) |
|
|
src = "/website/image/ir.attachment/%s_ccc838d/datas" % str(imgId) |
|
|
src = "/website/image/ir.attachment/%s_ccc838d/datas" % str(imgId) |
|
|
imgNode = ET.SubElement(imgDivNode, |
|
|
|
|
|
'img', |
|
|
|
|
|
attrib={'class': 'img-thumbnail', |
|
|
|
|
|
'src': src}) |
|
|
|
|
|
|
|
|
ET.SubElement(imgDivNode, |
|
|
|
|
|
'img', |
|
|
|
|
|
attrib={'class': 'img-thumbnail', |
|
|
|
|
|
'src': src}) |
|
|
arch = ET.tostring(rootNode, encoding='utf-8', xml_declaration=False) |
|
|
arch = ET.tostring(rootNode, encoding='utf-8', xml_declaration=False) |
|
|
vals = { |
|
|
vals = { |
|
|
'name': pageName, |
|
|
'name': pageName, |
|
@ -128,7 +128,7 @@ class test_export_help_wizard(object): |
|
|
for imgElem in templateNodeList[0].iter('img'): |
|
|
for imgElem in templateNodeList[0].iter('img'): |
|
|
imgSrc = imgElem.get('src') |
|
|
imgSrc = imgElem.get('src') |
|
|
if '/ir.attachment/' in imgSrc: |
|
|
if '/ir.attachment/' in imgSrc: |
|
|
self.assertIn("/ir.attachment/%s_img_02|" \ |
|
|
|
|
|
|
|
|
self.assertIn("/ir.attachment/%s_img_02|" |
|
|
% self.pageName, imgSrc) |
|
|
% self.pageName, imgSrc) |
|
|
else: |
|
|
else: |
|
|
self.assertIn("id=%s_img_01" % self.pageName, imgSrc) |
|
|
self.assertIn("id=%s_img_01" % self.pageName, imgSrc) |
|
@ -151,11 +151,11 @@ class test_export_help_with_image(test_export_help_wizard, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class test_export_help_template(test_export_help_wizard, |
|
|
class test_export_help_template(test_export_help_wizard, |
|
|
SharedSetupTransactionCase): |
|
|
|
|
|
|
|
|
SharedSetupTransactionCase): |
|
|
def setUp(self): |
|
|
def setUp(self): |
|
|
super(test_export_help_template, self).setUp() |
|
|
super(test_export_help_template, self).setUp() |
|
|
parameter_model = self.env['ir.config_parameter'] |
|
|
parameter_model = self.env['ir.config_parameter'] |
|
|
template_prefix = parameter_model.get_param( |
|
|
|
|
|
'help_online_template_prefix') |
|
|
|
|
|
|
|
|
param = 'help_online_template_prefix' |
|
|
|
|
|
template_prefix = parameter_model.get_param(param) |
|
|
self.pageName = '%stest-template' % template_prefix |
|
|
self.pageName = '%stest-template' % template_prefix |
|
|
self.pageTemplate = True |
|
|
self.pageTemplate = True |