Commit c1b6a827 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Invoice display User's Organisation information (if set)

   Invoice display's if user's organisation name (if set, in addition to his) and organisation address (if set replaces his), so his company can be invoiced rather them user.
parent 2b6ae500
......@@ -49,19 +49,36 @@
<article>
<h2>To</h2>
<address>
<p tal:content="python: context.getDestinationSectionTitle('')"></p>
<tal:block tal:define="destination_section_organisation python: context.getDestinationSectionValue()">
<p tal:condition="python: destination_section_organisation is not None">
<tal:block tal:content="python: destination_section_organisation.getDefaultEmailText('')"></tal:block>
<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_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_subordination.getDefaultEmailText('') or destination_section_organisation.getDefaultEmailText('')"></p>
<p>
<tal:block tal:repeat="line python: destination_section_subordination.getDefaultAddressText('').split('\n')">
<span style="display:block" tal:content="line"></span>
</tal:block>
<tal:block tal:content="python: destination_section_subordination.getDefaultRegionTitle()"></tal:block>
</p>
</tal:block>
<p tal:condition="python: destination_section_organisation is not None">
<tal:block tal:condition="python: destination_section_subordination is None">
<p tal:content="python: destination_section_organisation.getTitle() or ''"></p>
<p tal:content="python: destination_section_organisation.getDefaultEmailText('')"></p>
<p>
<tal:block tal:repeat="line python: destination_section_organisation.getDefaultAddressText('').split('\n')">
<span style="display:block" tal:content="line"></span>
</tal:block>
<tal:block tal:content="python: destination_section_organisation.getDefaultRegionTitle()"></tal:block>
</p>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</address>
<table class="meta">
<tr>
......@@ -181,6 +198,6 @@
<tal:block tal:condition="python: invoice_resource_document is not None" tal:content="structure python: invoice_resource_document.getData()">
</tal:block>
</tal:block>
<footer>Generated with ERP5 - Open Source ERP suite (www.erp5.org)</footer>
<footer>Generated with ERP5 - Open Source ERP suite (erp5.nexedi.com)</footer>
</body>
</html>
\ 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