Commit 5c095c3f authored by Jérome Perrin's avatar Jérome Perrin

Don't fail if some requirements are deleted

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23106 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dcc1b6a5
......@@ -57,7 +57,6 @@ AAA=</string> </value>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
\n
<office:document-content xmlns:draw=\'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\' xmlns:office=\'urn:oasis:names:tc:opendocument:xmlns:office:1.0\' xmlns:text=\'urn:oasis:names:tc:opendocument:xmlns:text:1.0\' xmlns:ooo=\'http://openoffice.org/2004/office\' xmlns:number=\'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\' xmlns:dc=\'http://purl.org/dc/elements/1.1/\' xmlns:meta=\'urn:oasis:names:tc:opendocument:xmlns:meta:1.0\' xmlns:table=\'urn:oasis:names:tc:opendocument:xmlns:table:1.0\' xmlns:dr3d=\'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\' xmlns:fo=\'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\' xmlns:style=\'urn:oasis:names:tc:opendocument:xmlns:style:1.0\' xmlns:xforms=\'http://www.w3.org/2002/xforms\' xmlns:form=\'urn:oasis:names:tc:opendocument:xmlns:form:1.0\' xmlns:script=\'urn:oasis:names:tc:opendocument:xmlns:script:1.0\' xmlns:ooow=\'http://openoffice.org/2004/writer\' xmlns:svg=\'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\' xmlns:chart=\'urn:oasis:names:tc:opendocument:xmlns:chart:1.0\' xmlns:dom=\'http://www.w3.org/2001/xml-events\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' xmlns:xsd=\'http://www.w3.org/2001/XMLSchema\' xmlns:xsi=\'http://www.w3.org/2001/XMLSchema-instance\' xmlns:oooc=\'http://openoffice.org/2004/calc\' xmlns:math=\'http://www.w3.org/1998/Math/MathML\' xmlns:tal=\'http://xml.zope.org/namespaces/tal\'\n
xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\'\n
xmlns:metal=\'http://xml.zope.org/namespaces/metal\'\n
......@@ -118,11 +117,11 @@ AAA=</string> </value>
\t\t\t\ttext:style-name python:\'Heading_20_%s\' % depth"><tal:trans i18n:domain="erp5_ui" i18n:translate="Project Line" /></text:h>\n
<text:p text:style-name=\'Text_20_body\' tal:content="current_requirement/getDescription"\n
tal:condition="current_requirement/getDescription">Description of project line.</text:p>\n
<tal:block tal:define="requirement_list python:current_requirement.contentValues(portal_type = \'Requirement\', sort_on = ((\'int_index\',\'ascending\', \'int\'),))">\n
<tal:block tal:define="requirement_list python:current_requirement.contentValues(portal_type=\'Requirement\', sort_on=((\'int_index\',\'ascending\', \'int\'),), checked_permission=\'View\')">\n
<!-- make sure there are some lines to display in the table -->\n
<tal:block tal:define="global has_content python:0"/>\n
<tal:block tal:repeat="requirement requirement_list">\n
<tal:block tal:condition="python:not requirement.contentValues(portal_type = \'Requirement\')">\n
<tal:block tal:condition="python:not requirement.contentValues(portal_type=\'Requirement\', checked_permission=\'View\')">\n
<tal:block tal:define="global has_content python:1"/>\n
</tal:block>\n
</tal:block>\n
......@@ -147,7 +146,7 @@ AAA=</string> </value>
</table:table-header-rows>\n
<tal:block tal:repeat="requirement requirement_list">\n
<!-- Display row is this is a leaf -->\n
<table:table-row tal:condition="python:not requirement.contentValues(portal_type = \'Requirement\')">\n
<table:table-row tal:condition="python:not requirement.contentValues(portal_type=\'Requirement\', checked_permission=\'View\')">\n
<table:table-cell table:style-name=\'RequirementList.A2\' office:value-type=\'string\'>\n
<text:p text:style-name=\'Table_20_Contents\' tal:content="python:requirement.getReference(\'%s-%s\' % (requirement_base, requirement.getIntIndex(requirement.getId())))">Reference here</text:p>\n
</table:table-cell>\n
......@@ -162,7 +161,7 @@ AAA=</string> </value>
</table:table>\n
<!-- Recursively display non leaf requirements -->\n
<tal:block tal:repeat="requirement requirement_list">\n
<tal:block tal:condition="python:requirement.contentValues(portal_type = \'Requirement\')">\n
<tal:block tal:condition="python:requirement.contentValues(portal_type=\'Requirement\', checked_permission=\'View\')">\n
<!-- Update globals - use reference or int_index or id as default reference -->\n
<tal:block tal:define="global depth python:depth + 1;\n
global dummy python:reference_list.append(\n
......
555
\ No newline at end of file
556
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment