Commit 4b389d34 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Drop getSubordination workaround from Printout

   Use directly the Destination Section and display more information if it was one Organisation
parent c3af0f16
...@@ -51,27 +51,25 @@ ...@@ -51,27 +51,25 @@
<address> <address>
<tal:block tal:define="destination_section_organisation python: context.getDestinationSectionValue()"> <tal:block tal:define="destination_section_organisation python: context.getDestinationSectionValue()">
<tal:block tal:condition="python: destination_section_organisation is not None"> <tal:block tal:condition="python: destination_section_organisation is not None">
<tal:block tal:define="destination_section_subordination python: destination_section_organisation.getSubordinationValue()"> <tal:block tal:condition="python: destination_section_organisation.getPortalType() == 'Organisation'">
<p tal:content="python: destination_section_organisation.getCorporateName() or destination_section_organisation.getTitle() or ''"></p>
<tal:block tal:condition="python: destination_section_subordination is not None">
<p tal:content="python: destination_section_subordination.getCorporateName() or destination_section_subordination.getTitle() or ''"></p>
<p tal:content="python: destination_section_organisation.getTitle() or ''"></p> <p tal:content="python: destination_section_organisation.getTitle() or ''"></p>
<p tal:content="python: destination_section_subordination.getDefaultEmailText('') or destination_section_organisation.getDefaultEmailText('')"></p> <p tal:content="python: destination_section_organisation.getDefaultEmailText('') or destination_section_organisation.getDefaultEmailText('')"></p>
<p> <p>
<tal:block tal:repeat="line python: destination_section_subordination.getDefaultAddressText('').split('\n')"> <tal:block tal:repeat="line python: destination_section_organisation.getDefaultAddressText('').split('\n')">
<span style="display:block" tal:content="line"></span> <span style="display:block" tal:content="line"></span>
</tal:block> </tal:block>
<tal:block tal:content="python: destination_section_subordination.getDefaultRegionTitle()"></tal:block> <tal:block tal:content="python: destination_section_organisation.getDefaultRegionTitle()"></tal:block>
</p> </p>
<tal:block tal:condition="python: destination_section_subordination.getCorporateRegistrationCode() is not None"> <tal:block tal:condition="python: destination_section_organisation.getCorporateRegistrationCode() is not None">
<p tal:content="python: 'Corporate Registration Code: %s' % destination_section_subordination.getCorporateRegistrationCode()"></p> <p tal:content="python: 'Corporate Registration Code: %s' % destination_section_organisation.getCorporateRegistrationCode()"></p>
</tal:block> </tal:block>
<tal:block tal:condition="python: destination_section_subordination.getVatCode() is not None"> <tal:block tal:condition="python: destination_section_organisation.getVatCode() is not None">
<p tal:content="python: 'VAT Code: %s' % destination_section_subordination.getVatCode()"></p> <p tal:content="python: 'VAT Code: %s' % destination_section_organisation.getVatCode()"></p>
</tal:block> </tal:block>
</tal:block> </tal:block>
<tal:block tal:condition="python: destination_section_subordination is None"> <tal:block tal:condition="python: destination_section_organisation.getPortalType() != 'Organisation'">
<p tal:content="python: destination_section_organisation.getTitle() or ''"></p> <p tal:content="python: destination_section_organisation.getTitle() or ''"></p>
<p tal:content="python: destination_section_organisation.getDefaultEmailText('')"></p> <p tal:content="python: destination_section_organisation.getDefaultEmailText('')"></p>
<p> <p>
...@@ -82,8 +80,6 @@ ...@@ -82,8 +80,6 @@
</p> </p>
</tal:block> </tal:block>
</tal:block> </tal:block>
</tal:block>
</tal:block> </tal:block>
</address> </address>
<table class="meta"> <table class="meta">
......
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