Commit f962a8c9 authored by Jérome Perrin's avatar Jérome Perrin

Accounting: balance sheet profit and loss cleanups, "british" layout on Profit & Loss

Rework Balance Sheet and Profit and Loss so that they are more consistent with other reports:
 - Ability to choose output format and produce in deferred mode
 - Allow specifying the date range explicitly, for current period and previous period as well. When dates are not specified, the previous behavior of guessing start date and previous date range from accounting periods is kept
 - Style fixes
 - Set a filename for *Save as ...*

Introduce a new feature on Profit and Loss to allow to have instead of the two column layout (used in France mostly):

| INCOME  | EXPENSE |
|---------|---------|
| **1. Revenue** | **1. Operating Expenses** | 
|     - ...... | - ...... | 
|    | - *Cost of Sales* | 
|     | - *Selling, General and Administrative Expenses* | 
|     | - *Other* | 
| **2. Non Operating Income** | **2. Non Operating Expense** | 
|     - ...... | - ...... | 
| **3. Interest Income** | **3. Interest Expense** |
|     - ...... | - ...... | 

Have a one column layout with intermediate profit/loss calculated for each level ( what I call "british layout" here):

| Profit and Loss  |
|---------|
| **1. Operating** |
|  * *Sales* | 
|  * *Operating Expenses* | 
|        - ...... |
|        - Cost of Sales | 
|        - Selling, General and Administrative Expenses | 
|        - Other | 
| **2. Non Operating** |
|  * *Non Operating Income* | 
|        - ...... | 
|  * *Non Operating Expense* |
|        - ...... | 
| 3. **Financial** |
|  * *Interest  Income* |
|        - ...... | 
|  * *Interest Expense* |
|        - ...... | 

This is achieved by putting all that hierarchy in `portal_categories/financial_section/income` and not splitting it in `income` and `expense`. This report will not display `expense` category if it is empty.

Still TODO:
* [x] updating https://www.erp5.com/erp5-HowTo.Select.Accounting.Financial.Section

/reviewed-on !284
parents 0e15a568 2cdd3cba
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
tal:define='money_quantity_style python:context.getPortalObject().portal_preferences.getPreferredMoneyQuantityStyle(""); tal:define='money_quantity_style python:context.getPortalObject().portal_preferences.getPreferredMoneyQuantityStyle("");
money_currency_do_grouping python:"1234" in money_quantity_style and "false" or "true"; money_currency_do_grouping python:"1234" in money_quantity_style and "false" or "true";
at_date request/at_date/latestTime; at_date request/at_date/latestTime;
at_date_previous_period python:modules["DateTime"].DateTime(at_date.year() - 1, at_date.month(), at_date.day()).latestTime(); from_date python: request.get("from_date") or context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date);
at_date_previous_period python: (request.get("at_date_previous_period") or (from_date - 1)).latestTime();
from_date_previous_period python: request.get("from_date_previous_period") or context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date_previous_period);
date_formatter nocall:here/Base_viewAccountingReport/my_date/render_pdf; date_formatter nocall:here/Base_viewAccountingReport/my_date/render_pdf;
from_date python:context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date);
from_date_previous_period python:context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date_previous_period);
portal_type here/getPortalAccountingMovementTypeList; portal_type here/getPortalAccountingMovementTypeList;
section_uid python: context.Base_getSectionUidListForSectionCategory(request["section_category"], request["section_category_strict"]); section_uid python: context.Base_getSectionUidListForSectionCategory(request["section_category"], request["section_category_strict"]);
financial_section python:context.getPortalObject().portal_categories.financial_section; financial_section python:context.getPortalObject().portal_categories.financial_section;
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
<!-- TOTAL LEVEL 1 {{{ --> <!-- TOTAL LEVEL 1 {{{ -->
<table:table-row table:style-name='ro7'> <table:table-row table:style-name='ro7'>
<table:table-cell table:style-name='report-stat1' office:value-type='string' tal:define="global level1_counter python:level1_counter + 1"> <table:table-cell table:style-name='report-stat-heading1' office:value-type='string' tal:define="global level1_counter python:level1_counter + 1">
<text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="category_level_1_title" tal:content='level1_title'> <text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="category_level_1_title" tal:content='level1_title'>
</tal:block> <tal:block i18n:name="level1_counter" tal:content='level1_counter'> </tal:block> <tal:block i18n:name="level1_counter" tal:content='level1_counter'>
</tal:block></text:p> </tal:block></text:p>
...@@ -480,7 +480,7 @@ ...@@ -480,7 +480,7 @@
<!-- TOTAL LEVEL 2 {{{ --> <!-- TOTAL LEVEL 2 {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' office:value-type='string'> <table:table-cell table:style-name='report-stat-heading2' office:value-type='string'>
<text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class" <text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class"
i18n:translate='' i18n:domain="ui" tal:content='string:Asset'></tal:block></text:p> i18n:translate='' i18n:domain="ui" tal:content='string:Asset'></tal:block></text:p>
</table:table-cell> </table:table-cell>
...@@ -883,7 +883,7 @@ ...@@ -883,7 +883,7 @@
<!-- TOTAL LEVEL 1 {{{ --> <!-- TOTAL LEVEL 1 {{{ -->
<table:table-row table:style-name='ro7'> <table:table-row table:style-name='ro7'>
<table:table-cell table:style-name='report-stat1' <table:table-cell table:style-name='report-stat-heading1'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
...@@ -919,7 +919,7 @@ ...@@ -919,7 +919,7 @@
<!-- TOTAL LEVEL 2 {{{ --> <!-- TOTAL LEVEL 2 {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
......
...@@ -66,7 +66,7 @@ dQEAAAAA</string> </value> ...@@ -66,7 +66,7 @@ dQEAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <unicode></unicode> </value> <value> <unicode>Balance Sheet</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -80,8 +80,12 @@ ...@@ -80,8 +80,12 @@
<string>your_section_category_strict</string> <string>your_section_category_strict</string>
<string>your_function</string> <string>your_function</string>
<string>your_project</string> <string>your_project</string>
<string>your_from_date</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_from_date_previous_period</string>
<string>your_at_date_previous_period</string>
<string>your_format</string> <string>your_format</string>
<string>your_deferred_style</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_at_date_previous_period</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_at_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Previous Period at Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_deferred_style</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_deferred_style</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -154,7 +154,9 @@ ...@@ -154,7 +154,9 @@
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -230,20 +232,7 @@ ...@@ -230,20 +232,7 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>OpenOffice Calc</string>
<string></string>
</tuple>
<tuple>
<string>PDF</string>
<string>pdf</string>
</tuple>
<tuple>
<string>Excel</string>
<string>xls</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -272,4 +261,17 @@ ...@@ -272,4 +261,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.Base_getConversionFormatItemList(base_content_type=\'application/vnd.oasis.opendocument.spreadsheet\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_from_date_previous_period</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Previous Period from Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -26,12 +26,14 @@ ...@@ -26,12 +26,14 @@
xmlns:i18n='http://xml.zope.org/namespaces/i18n' xmlns:i18n='http://xml.zope.org/namespaces/i18n'
xmlns:metal='http://xml.zope.org/namespaces/metal' xmlns:metal='http://xml.zope.org/namespaces/metal'
tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")'
tal:define='money_quantity_style python:context.getPortalObject().portal_preferences.getPreferredMoneyQuantityStyle(""); tal:define='portal python: context.getPortalObject();
has_income_and_expense_category python: bool(portal.portal_categories.financial_section.expense.contentValues());
money_quantity_style python:portal.portal_preferences.getPreferredMoneyQuantityStyle("");
money_currency_do_grouping python:"1234" in money_quantity_style and "false" or "true"; money_currency_do_grouping python:"1234" in money_quantity_style and "false" or "true";
at_date request/at_date/latestTime; at_date request/at_date/latestTime;
at_date_previous_period python:modules["DateTime"].DateTime(at_date.year() - 1, at_date.month(), at_date.day()).latestTime(); from_date python: request.get("from_date") or context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date);
from_date python:context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date); at_date_previous_period python: (request.get("at_date_previous_period") or (from_date - 1)).latestTime();
from_date_previous_period python:context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date_previous_period); from_date_previous_period python: request.get("from_date_previous_period") or context.Base_getAccountingPeriodStartDateForSectionCategory(section_category=request["section_category"], date=at_date_previous_period);
portal_type here/getPortalAccountingMovementTypeList; portal_type here/getPortalAccountingMovementTypeList;
date_formatter nocall:here/Base_viewAccountingReport/my_date/render_pdf; date_formatter nocall:here/Base_viewAccountingReport/my_date/render_pdf;
section_uid python: context.Base_getSectionUidListForSectionCategory(request["section_category"], request["section_category_strict"]); section_uid python: context.Base_getSectionUidListForSectionCategory(request["section_category"], request["section_category_strict"]);
...@@ -126,29 +128,8 @@ ...@@ -126,29 +128,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' i18n:domain='ui' i18n:attributes='table:name'>
<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'
...@@ -182,7 +163,33 @@ ...@@ -182,7 +163,33 @@
<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 tal:condition="has_income_and_expense_category"
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'>
...@@ -191,7 +198,7 @@ ...@@ -191,7 +198,7 @@
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
<text:p i18n:translate="" i18n:domain="ui">Expense</text:p> <text:p tal:content="portal/portal_categories/financial_section/expense/getTranslatedTitle">Expense</text:p>
</table:table-cell> </table:table-cell>
<table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/> <table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/>
<table:table-cell table:style-name='report-column-title' office:value-type='string'> <table:table-cell table:style-name='report-column-title' office:value-type='string'>
...@@ -403,7 +410,7 @@ ...@@ -403,7 +410,7 @@
<!-- TOTAL LEVEL 1 {{{ --> <!-- TOTAL LEVEL 1 {{{ -->
<table:table-row table:style-name='ro7'> <table:table-row table:style-name='ro7'>
<table:table-cell table:style-name='report-stat1' <table:table-cell table:style-name='report-stat-heading1'
office:value-type='string' office:value-type='string'
table:number-columns-spanned='3' table:number-columns-spanned='3'
table:number-rows-spanned='1' table:number-rows-spanned='1'
...@@ -439,12 +446,11 @@ ...@@ -439,12 +446,11 @@
<!-- loop level 2 --> <!-- loop level 2 -->
<!-- Total expense {{{ --> <!-- Total expense {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
table:number-columns-spanned='3' table:number-columns-spanned='3'
table:number-rows-spanned='1' table:number-rows-spanned='1'
office:value-type='string'> office:value-type='string'>
<text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class" <text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class" tal:content="portal/portal_categories/financial_section/expense/getTranslatedTitle"></tal:block></text:p>
i18n:translate='' i18n:domain="ui" tal:content='string:Expense'></tal:block></text:p>
</table:table-cell> </table:table-cell>
<table:covered-table-cell table:style-name="ce9"/> <table:covered-table-cell table:style-name="ce9"/>
<table:covered-table-cell table:style-name="ce9"/> <table:covered-table-cell table:style-name="ce9"/>
...@@ -460,7 +466,7 @@ ...@@ -460,7 +466,7 @@
<!-- NET PROFIT {{{ --> <!-- NET PROFIT {{{ -->
<table:table-row tal:condition="python: net_income &lt; 0 or net_income_previous_period &lt; 0"> <table:table-row tal:condition="python: net_income &lt; 0 or net_income_previous_period &lt; 0">
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
...@@ -479,7 +485,7 @@ ...@@ -479,7 +485,7 @@
<!-- TOTAL LEVEL 2 {{{ --> <!-- TOTAL LEVEL 2 {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
table:number-columns-spanned='3' table:number-columns-spanned='3'
table:number-rows-spanned='1' table:number-rows-spanned='1'
office:value-type='string'> office:value-type='string'>
...@@ -515,7 +521,8 @@ ...@@ -515,7 +521,8 @@
</table:table> <!-- new table --> </table:table> <!-- new table -->
<table:table table:style-name='ta1' table:print='false' table:name='Income' <table:table tal:attributes="table:name portal/portal_categories/financial_section/income/getTranslatedTitle"
table:style-name='ta1' table:print='false' table:name='Income'
i18n:domain='ui' i18n:attributes='table:name'> i18n:domain='ui' i18n:attributes='table:name'>
<office:forms form:apply-design-mode='false' form:automatic-focus='false'/> <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='co1' table:default-cell-style-name='report-title'/>
...@@ -534,6 +541,8 @@ ...@@ -534,6 +541,8 @@
global level2_title python:''; global level2_title python:'';
global level1_title python:'';"> global level1_title python:'';">
<tal:block tal:condition="not: has_income_and_expense_category" 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'>
...@@ -542,7 +551,7 @@ ...@@ -542,7 +551,7 @@
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
<text:p i18n:translate="" i18n:domain="ui">Income</text:p> <text:p tal:content="portal/portal_categories/financial_section/income/getTranslatedTitle">Income</text:p>
</table:table-cell> </table:table-cell>
<table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/> <table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/>
<table:table-cell table:style-name='report-column-title' office:value-type='string'> <table:table-cell table:style-name='report-column-title' office:value-type='string'>
...@@ -757,7 +766,7 @@ ...@@ -757,7 +766,7 @@
<!-- TOTAL LEVEL 1 {{{ --> <!-- TOTAL LEVEL 1 {{{ -->
<table:table-row table:style-name='ro7'> <table:table-row table:style-name='ro7'>
<table:table-cell table:style-name='report-stat1' <table:table-cell table:style-name='report-stat-heading1'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
...@@ -793,11 +802,11 @@ ...@@ -793,11 +802,11 @@
<!-- TOTAL INCOME {{{ --> <!-- TOTAL INCOME {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
<text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class" i18n:translate='' i18n:domain="ui" tal:content='string:Income'></tal:block></text:p> <text:p i18n:translate="" i18n:domain="ui">Total <tal:block i18n:name="class" tal:content="portal/portal_categories/financial_section/income/getTranslatedTitle"></tal:block></text:p>
</table:table-cell> </table:table-cell>
<table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/> <table:covered-table-cell table:style-name="ce9"/><table:covered-table-cell table:style-name="ce9"/>
<table:table-cell table:style-name='report-stat-currency2' <table:table-cell table:style-name='report-stat-currency2'
...@@ -809,9 +818,10 @@ ...@@ -809,9 +818,10 @@
</table:table-row> </table:table-row>
<!-- }}} --> <!-- }}} -->
<!-- NET LOSS {{{ --> <!-- NET LOSS {{{ -->
<table:table-row tal:condition="python: net_income &gt; 0 or net_income_previous_period &gt; 0"> <table:table-row tal:condition="python: has_income_and_expense_category and (net_income &gt; 0 or net_income_previous_period &gt; 0)">
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
...@@ -830,7 +840,7 @@ ...@@ -830,7 +840,7 @@
<!-- TOTAL LEVEL 2 {{{ --> <!-- TOTAL LEVEL 2 {{{ -->
<table:table-row> <table:table-row>
<table:table-cell table:style-name='report-stat2' <table:table-cell table:style-name='report-stat-heading2'
office:value-type='string' office:value-type='string'
table:number-rows-spanned='1' table:number-rows-spanned='1'
table:number-columns-spanned='3'> table:number-columns-spanned='3'>
......
...@@ -66,7 +66,7 @@ dQEAAAAA</string> </value> ...@@ -66,7 +66,7 @@ dQEAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <unicode></unicode> </value> <value> <unicode>Profit and Loss</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -80,8 +80,12 @@ ...@@ -80,8 +80,12 @@
<string>your_section_category_strict</string> <string>your_section_category_strict</string>
<string>your_function</string> <string>your_function</string>
<string>your_project</string> <string>your_project</string>
<string>your_from_date</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_from_date_previous_period</string>
<string>your_at_date_previous_period</string>
<string>your_format</string> <string>your_format</string>
<string>your_deferred_style</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_at_date_previous_period</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_at_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Previous Period at Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_deferred_style</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_deferred_style</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -154,7 +154,9 @@ ...@@ -154,7 +154,9 @@
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -230,20 +232,7 @@ ...@@ -230,20 +232,7 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>OpenOffice Calc</string>
<string></string>
</tuple>
<tuple>
<string>PDF</string>
<string>pdf</string>
</tuple>
<tuple>
<string>Excel</string>
<string>xls</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -272,4 +261,17 @@ ...@@ -272,4 +261,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.Base_getConversionFormatItemList(base_content_type=\'application/vnd.oasis.opendocument.spreadsheet\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_from_date_previous_period</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_from_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Previous Period from Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -9271,6 +9271,12 @@ msgstr "Page précédente" ...@@ -9271,6 +9271,12 @@ msgstr "Page précédente"
msgid "Previous Period" msgid "Previous Period"
msgstr "Exercice N-1" msgstr "Exercice N-1"
msgid "Previous Period at Date"
msgstr "Date de fin période précédente"
msgid "Previous Period from Date"
msgstr "Date de début période précédente"
msgid "Previous bank statement balance does not match reconciled balance at previous bank statement date" msgid "Previous bank statement balance does not match reconciled balance at previous bank statement date"
msgstr "Le solde du relevé précédent ne correspond pas à au solde rapproché à la date du précédent relevé" msgstr "Le solde du relevé précédent ne correspond pas à au solde rapproché à la date du précédent relevé"
......
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