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,29 +127,8 @@ ...@@ -127,29 +127,8 @@
<style:text-properties fo:font-size='12pt'/> <style:text-properties fo:font-size='12pt'/>
</style:style> </style:style>
</office:automatic-styles> <!-- }}} --> </office:automatic-styles> <!-- }}} -->
<office:body>
<office:spreadsheet>
<table:table table:style-name='ta1' table:print='false' table:name='Expense' tal:attributes="table:name portal/portal_categories/financial_section/expense/getTranslatedTitle">
<office:forms form:apply-design-mode='false' form:automatic-focus='false'/>
<table:table-column table:style-name='co1' table:default-cell-style-name='report-title'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce7'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce1'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce1'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='report-column-title'/>
<!-- Expense -->
<tal:block tal:define="global total_current_period python: 0;
global total_previous_period python: 0;
global grand_total_current_period python: 0;
global grand_total_previous_period python: 0;
global level1_counter python: 0;
global level2_title python:'';
global level1_title python:'';
">
<tal:block metal:define-macro="report_header">
<!-- Title {{{ --> <!-- Title {{{ -->
<table:table-row table:style-name='ro2'> <table:table-row table:style-name='ro2'>
<table:table-cell table:number-rows-spanned='2' <table:table-cell table:number-rows-spanned='2'
...@@ -183,7 +162,32 @@ ...@@ -183,7 +162,32 @@
<table:table-cell table:style-name='ce1' table:number-columns-repeated='2'/> <table:table-cell table:style-name='ce1' table:number-columns-repeated='2'/>
</table:table-row> </table:table-row>
<!-- }}} --> <!-- }}} -->
</tal:block>
<office:body>
<office:spreadsheet>
<table:table table:style-name='ta1' table:print='false' table:name='Expense' tal:attributes="table:name portal/portal_categories/financial_section/expense/getTranslatedTitle">
<office:forms form:apply-design-mode='false' form:automatic-focus='false'/>
<table:table-column table:style-name='co1' table:default-cell-style-name='report-title'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce7'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce1'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='ce1'/>
<table:table-column table:style-name='co2' table:default-cell-style-name='report-column-title'/>
<!-- Expense -->
<tal:block tal:define="global total_current_period python: 0;
global total_previous_period python: 0;
global grand_total_current_period python: 0;
global grand_total_previous_period python: 0;
global level1_counter python: 0;
global level2_title python:'';
global level1_title python:'';
">
<tal:block metal:use-macro="template/macros/report_header"/>
<!-- 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