From aeaab6696342a3fd708ad58c0eb28a674918fedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Ninivin?= <cedric.leninivin@tiolive.com> Date: Tue, 2 May 2017 09:17:02 +0000 Subject: [PATCH] erp5_consulting: Fix UseCaseModule_viewUseCaseReportAsSxw and use selection --- .../UseCaseModule_viewUseCaseReportAsSxw.oot | 9 +++++---- .../UseCaseModule_viewUseCaseReportAsSxw.xml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.oot b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.oot index 0cd4608e91..567102d983 100644 --- a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.oot +++ b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.oot @@ -88,7 +88,7 @@ <text:p text:style-name='Text body'>Nexedi SA</text:p> - <div tal:omit-tag='' tal:repeat='usecase python:here.searchFolder(portal_type="Use Case",sort_on=(("int_index",),), validation_state="validated") or (context,)'> + <div tal:omit-tag='' tal:repeat='usecase python:here.getPortalObject().portal_selections.callSelectionFor("use_case_selection")'> <text:h text:style-name='Heading 2' text:level='2' i18n:domain="ui" i18n:translate="">Use Case : <span tal:replace='usecase/getTitle'>Title</span></text:h> <text:p text:style-name='Text body' tal:replace="structure python: render_text(usecase.getDescription(), {'{http://openoffice.org/2000/text}style-name': 'Text body'})">Use Case Description</text:p> @@ -105,8 +105,9 @@ svg:width="12cm" svg:height="7.516cm" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" - tal:attributes="xlink:href python:request.oo_builder.addImage(image.index_html(None,None)); - svg:height python:'%scm' % (12 * float(image.height()) / max(float(image.width()),0))" /> + tal:condition="python: image.width != 0" + tal:attributes="xlink:href python:ooo_builder.addImage(image.index_html(None,None)); + svg:height python:'%scm' % (12 * float(image.height) / max(float(image.width),0))" /> </text:p> </tal:block> @@ -215,4 +216,4 @@ </div> </office:body> -</office:document-content> +</office:document-content> \ No newline at end of file diff --git a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml index cf1e008501..af6d7540a0 100644 --- a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml +++ b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml @@ -64,7 +64,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string></string> </value> + <value> <unicode></unicode> </value> </item> </dictionary> </pickle> -- 2.30.9