diff --git a/content/developer/howtos/accounting_localization.rst b/content/developer/howtos/accounting_localization.rst index 139a1b559..5764e96fe 100644 --- a/content/developer/howtos/accounting_localization.rst +++ b/content/developer/howtos/accounting_localization.rst @@ -248,7 +248,7 @@ Tax Report The tax report is declared in the :guilabel:`Invoicing` (`account`) app, but the report is only accessible when :guilabel:`Accounting` (`account_accountant`) is installed. .. seealso:: - - :ref:`Tax Report Line References ` + - :doc:`/developer/reference/standard_modules/account/account_report_line` - :doc:`/applications/finance/accounting/reporting/declarations/tax_returns` In the previous section, you noticed the fields `invoice_repartition_line_ids` or `refund_repartition_line_ids` and probably understood nothing about them. Good news: you are not alone on this incomprehension. Bad news: you have to figure it out a bit. The topic is complicated. Indeed: @@ -258,27 +258,22 @@ In the previous section, you noticed the fields `invoice_repartition_line_ids` o The simple version is that, in the tax template, you indicate in the invoice/refund repartition lines whether the base or a percentage of the tax needs to be reported in which report line (through the *minus/plus_report_line_ids* fields). It becomes clear also when you check the tax configuration in the Odoo interface (or check the docs :ref:`Tax References `, :ref:`Tax Repartition References `). -And fortunately we have a presentation explaining the tax reports (as in version 13.0) in details: -.. youtube:: PuXE_NyFRTM - :align: right - :width: 700 - :height: 394 - -So, once you have properly configured taxes, you just need to add the :file:`data/account_tax_report_data.xml` file with a record for your `account.tax.report` at the beginning: +So, once you have properly configured taxes, you just need to add the :file:`data/account_tax_report_data.xml` file with a record for your `account.report`. For it to be considered as a tax report, you need to provide it with the right `root_report_id`. .. code-block:: xml - + Tax Report + ... -... followed by the declaration of its lines, as `account.tax.report.line` records. +... followed by the declaration of its lines, as `account.report.line` records. .. example:: `addons/l10n_au/data/account_tax_report_data.xml <{GITHUB_PATH}/addons/l10n_au/data/account_tax_report_data.xml>`_ @@ -361,7 +356,8 @@ Basic :file:`__manifest__.py` file for such a module looks as following: "l10n_XX", "account_reports" ], "data": [ - "data/account_financial_html_report_data.xml", + "data/balance_sheet.xml", + "data/profit_and_loss.xml", ], "auto_install": True, } @@ -374,13 +370,12 @@ Some good examples: * `l10n_ch_reports/data/account_financial_html_report_data.xml <{GITHUB_ENT_PATH}/l10n_ch_reports/data/account_financial_html_report_data.xml>`_ * `l10n_be_reports/data/account_financial_html_report_data.xml <{GITHUB_ENT_PATH}/l10n_be_reports/data/account_financial_html_report_data.xml>`_ -For the fields' meaning, dive directly to the source: +You can check the meaning of the fields here: -* `account.financial.html.report (v15) `_ -* `account.financial.html.report.line (v15) `_ +* :doc:`/developer/reference/standard_modules/account/account_report` +* :doc:`/developer/reference/standard_modules/account/account_report_line` -The menu for the new report is created automatically. By default, it is located under :menuselection:`Accounting -> Reporting`. -To create a dedicated section in the :guilabel:`Reporting` menu, you need to create a new `ir.ui.menu` record (usually in the main `l10n_XX` module) and set it as `parent_id` field in the `account.financial.html.report` model. Example for the Belgian localization: +If you gave a `root_report_id` to your report, it is now available in its variant selector. If not, you still need to add a menu item for it. A default menu item can be created from the form view of the report, by clicking on 'Actions', then 'Create Menu Item'. You'll then need to refresh the page to see it. Alternatively, to create a dedicated section for a totally new report in the :guilabel:`Reporting` menu, you need to create a new `ir.ui.menu` record (usually in the main `l10n_XX` module) and a new `ir.actions.client` (usually in the new report xml file) that calls the `account.report` with the new report id. Then, set the new menu as `parent_id` field in the action model. Example for the Belgian localization: * `ir.ui.menu record in l10n_be <{GITHUB_PATH}/addons/l10n_be/data/menuitem_data.xml>`_ -* `parent_id field in l10n_be_reports (v15) `_ +* `parent_id field in l10n_be_reports (v16) `_ diff --git a/content/developer/howtos/accounting_localization/tax_report.dot b/content/developer/howtos/accounting_localization/tax_report.dot index 1617088b0..aae02b2bd 100644 --- a/content/developer/howtos/accounting_localization/tax_report.dot +++ b/content/developer/howtos/accounting_localization/tax_report.dot @@ -20,6 +20,7 @@ digraph foo { label = "Invoices"; color = lightyellow; node [style=filled, color=white]; + edge [fontsize=8,]; account_move_line[label="account.move.line"] account_tax[label="account.tax"] account_tax_repartition_line[label="account.tax.repartition.line"]; @@ -35,10 +36,10 @@ digraph foo { label = "Reporting"; color = mistyrose; node [style=filled, color=white]; - account_tax_report_line[label="account.tax.report.line"]; - account_generic_tax_report[label="account.generic.tax.report"]; - account_tax_report[label="account.tax.report"]; - account_tax_report -> account_generic_tax_report [label="Calls and displays", dir=back]; + edge [fontsize=8,]; + account_tax_report [label="account.report"]; + account_tax_report_line [label="account.report.line"]; + account_report_expression [label="account.report.expression"]; account_tax_report -> account_tax_report_line [label="0..*"] } subgraph cluster_templates { @@ -46,10 +47,16 @@ digraph foo { label = "Templates"; color = lightblue; node [style=filled, color=white]; + edge [fontsize=8,]; account_tax_template[label="account.tax.template"]; account_tax_repartition_line_template[label="account.tax.repartition.line.template"]; account_tax_template -> account_tax_repartition_line_template [label="1 for base, 1..* for tax amount"]; } + { + rank=same; + account_move_line; + account_tax_report; + } { rank=same; account_tax; @@ -59,15 +66,16 @@ digraph foo { } { rank=same; - account_tax_report; - account_tax_report_line; + account_report_expression; account_tax_template; account_tax_repartition_line_template; } - account_tax -> account_tax_template [label="Creates when installing CoA", dir=back]; - account_tax_repartition_line -> account_tax_repartition_line_template [label="Creates when installing CoA", dir=back]; + account_tax -> account_tax_template [label=" Creates when\n installing CoA", dir=back]; + account_tax_repartition_line -> account_tax_repartition_line_template[label=" Creates when\n installing CoA", dir=back]; account_tax_repartition_line_template -> account_account_tag [label="tag_ids"]; - account_tax_report_line -> account_account_tag [label="Creates (+ and -)"]; + account_tax_report_line -> account_report_expression [label="0..*"]; + account_tax_report_line -> account_tax_report_line [label="children_ids"]; + account_report_expression -> account_account_tag [label="Engine tax_tags 1..*"]; account_tax_report -> res_country [label="0..1"]; account_account_tag -> res_country [label="0..1"]; -} \ No newline at end of file +} diff --git a/content/developer/reference/standard_modules/account.rst b/content/developer/reference/standard_modules/account.rst index ed1e6d6f1..4e0f7d969 100644 --- a/content/developer/reference/standard_modules/account.rst +++ b/content/developer/reference/standard_modules/account.rst @@ -12,6 +12,7 @@ Accounting account/account_chart_template account/account_fiscal_position account/account_group - account/account_tax_report_line + account/account_report + account/account_report_line account/account_tax account/account_tax_repartition diff --git a/content/developer/reference/standard_modules/account/account_account_tag.rst b/content/developer/reference/standard_modules/account/account_account_tag.rst index bd13aea94..99c2368b0 100644 --- a/content/developer/reference/standard_modules/account/account_account_tag.rst +++ b/content/developer/reference/standard_modules/account/account_account_tag.rst @@ -11,6 +11,5 @@ Account Tag .. autofield:: applicability .. autofield:: color .. autofield:: active - .. autofield:: tax_report_line_ids .. autofield:: tax_negate .. autofield:: country_id diff --git a/content/developer/reference/standard_modules/account/account_report.rst b/content/developer/reference/standard_modules/account/account_report.rst new file mode 100644 index 000000000..ba9048fa1 --- /dev/null +++ b/content/developer/reference/standard_modules/account/account_report.rst @@ -0,0 +1,33 @@ + +=============== +Report +=============== + +.. automodel:: odoo.addons.account.models.account_report.AccountReport + :main: + + .. autofield:: name + .. autofield:: line_ids + .. autofield:: column_ids + .. autofield:: root_report_id + .. autofield:: chart_template_id + .. autofield:: country_id + .. autofield:: only_tax_exigible + .. autofield:: caret_options_initializer + .. autofield:: availability_condition + .. autofield:: load_more_limit + .. autofield:: search_bar + .. autofield:: default_opening_date_filter + .. autofield:: filter_multi_company + .. autofield:: filter_date_range + .. autofield:: filter_show_draft + .. autofield:: filter_unreconciled + .. autofield:: filter_unfold_all + .. autofield:: filter_period_comparison + .. autofield:: filter_growth_comparison + .. autofield:: filter_journals + .. autofield:: filter_analytic + .. autofield:: filter_hierarchy + .. autofield:: filter_account_type + .. autofield:: filter_partner + .. autofield:: filter_fiscal_position \ No newline at end of file diff --git a/content/developer/reference/standard_modules/account/account_report_line.rst b/content/developer/reference/standard_modules/account/account_report_line.rst new file mode 100644 index 000000000..3e34b8b94 --- /dev/null +++ b/content/developer/reference/standard_modules/account/account_report_line.rst @@ -0,0 +1,18 @@ + +=============== +Report Line +=============== + +.. automodel:: odoo.addons.account.models.account_report.AccountReportLine + :main: + + .. autofield:: name + .. autofield:: expression_ids + .. autofield:: report_id + .. autofield:: hierarchy_level + .. autofield:: parent_id + .. autofield:: children_ids + .. autofield:: foldable + .. autofield:: print_on_new_page + .. autofield:: action_id + .. autofield:: hide_if_zero diff --git a/content/developer/reference/standard_modules/account/account_tax_report_line.rst b/content/developer/reference/standard_modules/account/account_tax_report_line.rst deleted file mode 100644 index fa9df6e21..000000000 --- a/content/developer/reference/standard_modules/account/account_tax_report_line.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _reference/account_tax_report_line: - -=============== -Tax Report Line -=============== - -.. automodel:: odoo.addons.account.models.account_tax_report.AccountTaxReportLine - :main: - - .. autofield:: name - .. autofield:: tag_ids - .. autofield:: report_action_id - .. autofield:: children_line_ids - .. autofield:: parent_id - .. autofield:: sequence - .. autofield:: report_id - .. autofield:: tag_name - .. autofield:: code - .. autofield:: formula - .. autofield:: carry_over_condition_method - .. autofield:: carry_over_destination_line_id - .. autofield:: carryover_line_ids - .. autofield:: is_carryover_persistent - .. autofield:: is_carryover_used_in_balance