Commit 167597a2 authored by Jérome Perrin's avatar Jérome Perrin

accounting: make a macro for P&L report header

(Just moving code arround to prepare next commit)
parent d0d0341c
...@@ -127,6 +127,43 @@ ...@@ -127,6 +127,43 @@
<style:text-properties fo:font-size='12pt'/> <style:text-properties fo:font-size='12pt'/>
</style:style> </style:style>
</office:automatic-styles> <!-- }}} --> </office:automatic-styles> <!-- }}} -->
<tal:block metal:define-macro="report_header">
<!-- Title {{{ -->
<table:table-row table:style-name='ro2'>
<table:table-cell table:number-rows-spanned='2'
table:number-columns-spanned='1'
office:value-type='string'
table:style-name='report-title'>
<text:p tal:content='python: context.portal_categories.restrictedTraverse(request["section_category"]).getTranslatedTitle()'/>
</table:table-cell>
<table:table-cell table:number-rows-spanned='1' table:number-columns-spanned='4'
office:value-type='string' table:style-name='report-title'>
<text:p i18n:translate="" i18n:domain="ui">Profit and Loss</text:p>
</table:table-cell>
<table:covered-table-cell table:number-columns-repeated='2'/>
<table:covered-table-cell table:style-name='ce1' table:number-columns-repeated='1'/>
</table:table-row>
<table:table-row table:style-name='ro2'>
<table:table-cell table:style-name='ce1'><text:p/></table:table-cell>
<table:table-cell table:style-name='report-title-date'
table:number-rows-spanned='1' table:number-columns-spanned='4'>
<text:p tal:content="python:date_formatter(at_date)">Date</text:p>
</table:table-cell>
<table:covered-table-cell table:number-columns-repeated='2'/>
<table:covered-table-cell table:style-name='ce1' table:number-columns-repeated='1'/>
</table:table-row>
<table:table-row table:style-name='ro2'>
<table:table-cell table:style-name='ce1'/>
<table:table-cell table:style-name='ce8'/>
<table:table-cell/>
<table:table-cell table:style-name='ce1' table:number-columns-repeated='2'/>
</table:table-row>
<!-- }}} -->
</tal:block>
<office:body> <office:body>
<office:spreadsheet> <office:spreadsheet>
...@@ -150,40 +187,7 @@ ...@@ -150,40 +187,7 @@
global level1_title python:''; global level1_title python:'';
"> ">
<!-- Title {{{ --> <tal:block metal:use-macro="template/macros/report_header"/>
<table:table-row table:style-name='ro2'>
<table:table-cell table:number-rows-spanned='2'
table:number-columns-spanned='1'
office:value-type='string'
table:style-name='report-title'>
<text:p tal:content='python: context.portal_categories.restrictedTraverse(request["section_category"]).getTranslatedTitle()'/>
</table:table-cell>
<table:table-cell table:number-rows-spanned='1' table:number-columns-spanned='4'
office:value-type='string' table:style-name='report-title'>
<text:p i18n:translate="" i18n:domain="ui">Profit and Loss</text:p>
</table:table-cell>
<table:covered-table-cell table:number-columns-repeated='2'/>
<table:covered-table-cell table:style-name='ce1' table:number-columns-repeated='1'/>
</table:table-row>
<table:table-row table:style-name='ro2'>
<table:table-cell table:style-name='ce1'><text:p/></table:table-cell>
<table:table-cell table:style-name='report-title-date'
table:number-rows-spanned='1' table:number-columns-spanned='4'>
<text:p tal:content="python:date_formatter(at_date)">Date</text:p>
</table:table-cell>
<table:covered-table-cell table:number-columns-repeated='2'/>
<table:covered-table-cell table:style-name='ce1' table:number-columns-repeated='1'/>
</table:table-row>
<table:table-row table:style-name='ro2'>
<table:table-cell table:style-name='ce1'/>
<table:table-cell table:style-name='ce8'/>
<table:table-cell/>
<table:table-cell table:style-name='ce1' table:number-columns-repeated='2'/>
</table:table-row>
<!-- }}} -->
<!-- Header {{{ --> <!-- Header {{{ -->
<table:table-header-rows> <table:table-header-rows>
<table:table-row table:style-name='ro3'> <table:table-row table:style-name='ro3'>
......
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