From 592f12850bee6e628c78d5d49640a6a65bf83b10 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Fri, 30 Oct 2015 13:37:36 +0100 Subject: [PATCH] [ADD] accounting: How to create customized reports with your own formulas ? https://docs.google.com/document/d/131Xzg6AblBrlMl9km1fWdOSdg5BG4Ahjhw200jmPau8/edit#heading=h.70ldvcnlkutn --- accounting/others/reporting.rst | 3 +- accounting/others/reporting/customize.rst | 98 ++++++++++++++++++ .../others/reporting/media/customize01.png | Bin 0 -> 3107 bytes .../others/reporting/media/customize02.png | Bin 0 -> 11980 bytes .../others/reporting/media/customize03.png | Bin 0 -> 12626 bytes .../others/reporting/media/customize04.png | Bin 0 -> 11439 bytes 6 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 accounting/others/reporting/customize.rst create mode 100644 accounting/others/reporting/media/customize01.png create mode 100644 accounting/others/reporting/media/customize02.png create mode 100644 accounting/others/reporting/media/customize03.png create mode 100644 accounting/others/reporting/media/customize04.png diff --git a/accounting/others/reporting.rst b/accounting/others/reporting.rst index 5196502a7..ab93506c8 100644 --- a/accounting/others/reporting.rst +++ b/accounting/others/reporting.rst @@ -5,4 +5,5 @@ Reporting .. toctree:: :titlesonly: - reporting/main_reports \ No newline at end of file + reporting/main_reports + reporting/customize \ No newline at end of file diff --git a/accounting/others/reporting/customize.rst b/accounting/others/reporting/customize.rst new file mode 100644 index 000000000..273e4e8f2 --- /dev/null +++ b/accounting/others/reporting/customize.rst @@ -0,0 +1,98 @@ +========================================================= +How to get a customized reports with your own formulas ? +========================================================= + +Overview +======== + +Odoo 9 comes with a powerful and easy-to-use reporting framework. +Creating new reports (such as a tax report or a balance sheet for a +specific country) to suit your needs is now easier than ever. + +Activate the developer mode +=========================== + +In order to have access to the financial report creation interface, the +**developer mode** needs to be activated. To do that, first click the +**?** at the top right, then **About**. + +.. image:: media/customize01.png + :align: center + +Click on : **Activate the developer mode**. + +.. image:: media/customize03.png + :align: center + +Create your financial report +============================ + +First, you need to create your financial report. To do that, go to +:menuselection:`Accounting --> Configuration --> Financial Reports` + +.. image:: media/customize02.png + :align: center + +Once the name is filled, there are two other parameters that need to be +configured: + +- **Show Credit and Debit Columns** + +- **Analysis Period** : + + - Based on date ranges (eg Profit and Loss) + + - Based on a single date (eg Balance Sheet) + + - Based on date ranges with 'older' and 'total' columns and last 3 + months (eg. Aged Partner Balances) + + - Bases on date ranges and cash basis method (eg Cash Flow + Statement) + +Add lines in your custom reports +================================= + +After you've created the report, you need to fill it with lines. They +all need a **name**, a **code** (that is used to refer to the line), a +**sequence number** and a **level** (Used for the line rendering). + +.. image:: media/customize04.png + :align: center + +In the **formulas** field you can add one or more formulas to assign a +value to the balance column (and debit and credit column if applicable – +separated by ;) + +You have several objects available in the formula : + +- ``Ndays`` : The number of days in the selected period (for reports with a + date range). + +- Another report, referenced by its code. Use ``.balance`` to get its + balance value (also available are ``.credit``, ``.debit`` and + ``.amount_residual``) + +A line can also be based on the sum of account move lines on a selected +domain. In which case you need to fill the domain field with an Odoo +domain on the account move line object. Then an extra object is +available in the formulas field, namely ``sum``, the sum of the account +move lines in the domain. You can also use the group by field to group +the account move lines by one of their columns. + +Other useful fields : + +- **Type** : Type of the result of the formula. + +- **Is growth good when positive** : Used when computing the comparison + column. Check if growth is good (displayed in green) or not. + +- **Special date changer** : If a specific line in a report should not use + the same dates as the rest of the report. + +- **Show domain** : How the domain of a line is displayed. Can be foldable + (``default``, hidden at the start but can be unfolded), ``always`` + (always displayed) or ``never`` (never shown). + +.. seealso:: + * :doc:`main_reports` \ No newline at end of file diff --git a/accounting/others/reporting/media/customize01.png b/accounting/others/reporting/media/customize01.png new file mode 100644 index 0000000000000000000000000000000000000000..37ff92125dec27ae3a2640d607ea41997fe0bffe GIT binary patch literal 3107 zcmV+;4BYdHP)Px&08mU+MgRZ*{{H@rjg5?qjP>>P{{R4vj*g;6iGDY0 zkB^Uwi;IVchlq%XgoK3l_V#^!ef|CYYA#uOdwYL>e`aQ8f`Wp1d3kzzdi?zS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