[16.0][IMP][account_financial_report]: add custom intervals for aged partner report
parent
5191705e71
commit
ba80250016
|
@ -7,7 +7,7 @@ Account Financial Reports
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:cef68d51599f099ae394d2d6b98944bf45323ba4bf3e88483aafc1697ade7833
|
||||
!! source digest: sha256:fcb9a885dbf2d1e1ec9ca61d60bc1f1e4f77c99b18d3a3c3747c7d33a2901fd8
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
|
@ -45,11 +45,45 @@ currency used in account move lines is properly shown.
|
|||
In case that in an account has not been configured a second currency foreign
|
||||
currency balances are not available.
|
||||
|
||||
Invoicing / Settings / Invoicing / OCA Aged Report Configuration you will be able to set
|
||||
dynamic intervals that will appear on the Aged Partner Balance.
|
||||
For further information, check CONFIGURE.rst
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To configure dynamic intervals for Aged Partner Balance you need to:
|
||||
|
||||
Go on 'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
||||
|
||||
Click on option 'Configurations' and create new record.
|
||||
|
||||
Create new interval.
|
||||
The name established on line will be the column to display in Aged Partner Balance.
|
||||
Inferior limit established on line is the interval
|
||||
|
||||
Example of configuration inferior limit:
|
||||
|
||||
-> 15
|
||||
-> 30
|
||||
-> 60
|
||||
|
||||
It means the first interval is from 0 to 15, the second from 16 to 30, and the third is 61+.
|
||||
|
||||
Go on 'Invoicing' -> 'Reports' -> 'OCA accounting reports' -> 'Aged Partner Balance'
|
||||
|
||||
When wizard is open, you need to select your interval configuration and print report.
|
||||
|
||||
If you want to get default interval configuration any time you wish to print Aged Partner Report,
|
||||
you can set default interval configuration per company in:
|
||||
|
||||
'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
|
@ -134,6 +168,7 @@ Contributors
|
|||
* João Marques
|
||||
* Alexandre D. Díaz
|
||||
* Víctor Martínez
|
||||
* Carolina Fernandez
|
||||
|
||||
* `Sygel <https://www.sygel.es>`__:
|
||||
|
||||
|
|
|
@ -18,12 +18,14 @@
|
|||
"depends": ["account", "date_range", "report_xlsx"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"security/security.xml",
|
||||
"wizard/aged_partner_balance_wizard_view.xml",
|
||||
"wizard/general_ledger_wizard_view.xml",
|
||||
"wizard/journal_ledger_wizard_view.xml",
|
||||
"wizard/open_items_wizard_view.xml",
|
||||
"wizard/trial_balance_wizard_view.xml",
|
||||
"wizard/vat_report_wizard_view.xml",
|
||||
"view/account_age_report_configuration_views.xml",
|
||||
"menuitems.xml",
|
||||
"reports.xml",
|
||||
"report/templates/layouts.xml",
|
||||
|
@ -40,6 +42,7 @@
|
|||
"view/report_open_items.xml",
|
||||
"view/report_aged_partner_balance.xml",
|
||||
"view/report_vat_report.xml",
|
||||
"view/res_config_settings_views.xml",
|
||||
],
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
|
|
|
@ -49,6 +49,11 @@ msgstr ""
|
|||
msgid "<b>Taxes summary</b>"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "<span class=\"o_form_label\">Intervals configuration</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.aged_partner_balance_wizard
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.general_ledger_wizard
|
||||
|
@ -89,6 +94,11 @@ msgstr ""
|
|||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__account_age_report_config_id
|
||||
msgid "Account Age Report Config"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__account_code_from
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__account_code_from
|
||||
|
@ -150,6 +160,11 @@ msgstr ""
|
|||
msgid "Additional Filtering"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.actions.act_window,name:account_financial_report.action_aged_partner_report_configuration
|
||||
msgid "Age Partner Report Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
msgid ""
|
||||
|
@ -416,9 +431,22 @@ msgstr ""
|
|||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#: model:ir.model.constraint,message:account_financial_report.constraint_account_age_report_configuration_line_unique_name_config_combination
|
||||
#, python-format
|
||||
msgid "Name must be unique per report configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__company_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_abstract_wizard__company_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__company_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__company_id
|
||||
|
@ -435,6 +463,16 @@ msgstr ""
|
|||
msgid "Compute accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "Configurations"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_uid
|
||||
|
@ -446,6 +484,8 @@ msgid "Created by"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__create_date
|
||||
|
@ -637,6 +677,8 @@ msgid "Detail Taxes"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__display_name
|
||||
|
@ -916,6 +958,14 @@ msgstr ""
|
|||
msgid "Grouped By"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,help:account_financial_report.field_res_company__age_partner_config_id
|
||||
#: model:ir.model.fields,help:account_financial_report.field_res_config_settings__default_age_partner_config_id
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid ""
|
||||
"Here you can set the intervals that will appear on the Aged Partner Balance."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
|
@ -945,6 +995,8 @@ msgid "Hierarchy Levels to display"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__id
|
||||
|
@ -987,6 +1039,13 @@ msgstr ""
|
|||
msgid "Initial balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__age_partner_config_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_res_company__age_partner_config_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_res_config_settings__default_age_partner_config_id
|
||||
msgid "Intervals configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
|
@ -1056,6 +1115,8 @@ msgid "Journals"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard____last_update
|
||||
|
@ -1066,6 +1127,8 @@ msgid "Last Modified on"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__write_uid
|
||||
|
@ -1076,6 +1139,8 @@ msgid "Last Updated by"
|
|||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__write_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__write_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__write_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__write_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__write_date
|
||||
|
@ -1107,6 +1172,27 @@ msgstr ""
|
|||
msgid "Limit hierarchy levels"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__line_ids
|
||||
msgid "Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, python-format
|
||||
msgid "Inferior Limit must be greather than zero"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
|
||||
msgid "Model to set interval lines for Age partner balance report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_account_age_report_configuration
|
||||
msgid "Model to set intervals for Age partner balance report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger.py:0
|
||||
|
@ -1128,10 +1214,18 @@ msgstr ""
|
|||
msgid "Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, python-format
|
||||
msgid "Must complete Configuration Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__name
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_vat_report_base
|
||||
|
@ -1196,6 +1290,11 @@ msgstr ""
|
|||
msgid "Not due"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "OCA Aged Report Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.ui.menu,name:account_financial_report.menu_oca_reports
|
||||
msgid "OCA accounting reports"
|
||||
|
@ -1496,6 +1595,11 @@ msgstr ""
|
|||
msgid "Starting account in a range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__inferior_limit
|
||||
msgid "Inferior Limit"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
|
||||
msgid "Tags"
|
||||
|
|
|
@ -53,6 +53,11 @@ msgstr "91 - 120 d."
|
|||
msgid "<b>Taxes summary</b>"
|
||||
msgstr "<b>Resumen de Impuestos</b>"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "<span class=\"o_form_label\">Intervals configuration</span>"
|
||||
msgstr "<span class=\"o_form_label\">Configuración de intervalos</span>"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.aged_partner_balance_wizard
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.general_ledger_wizard
|
||||
|
@ -93,6 +98,11 @@ msgstr "Extracto XLSX Account Financial Report"
|
|||
msgid "Account"
|
||||
msgstr "Cuenta"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__account_age_report_config_id
|
||||
msgid "Account Age Report Config"
|
||||
msgstr "Configuración del informe de calidad de deuda"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__account_code_from
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__account_code_from
|
||||
|
@ -154,6 +164,11 @@ msgstr "Activar centralización"
|
|||
msgid "Additional Filtering"
|
||||
msgstr "Filtrado adicional"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.actions.act_window,name:account_financial_report.action_aged_partner_report_configuration
|
||||
msgid "Age Partner Report Configuration"
|
||||
msgstr "Configuración Calidad de deuda"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
msgid ""
|
||||
|
@ -424,6 +439,18 @@ msgstr "Grupos Hijos"
|
|||
msgid "Code"
|
||||
msgstr "Código"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#: model:ir.model.constraint,message:account_financial_report.constraint_account_age_report_configuration_line_unique_name_config_combination
|
||||
#, python-format
|
||||
msgid "Name must be unique per report configuration"
|
||||
msgstr "El nombre debe ser único por cada configuración del informe"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Compañías"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
|
@ -444,6 +471,18 @@ msgid "Compute accounts"
|
|||
msgstr "Cuentas calculadas"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Opciones de configuración"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "Configurations"
|
||||
msgstr "Configuraciones"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__create_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__create_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__create_uid
|
||||
|
@ -454,6 +493,8 @@ msgid "Created by"
|
|||
msgstr "Creado por"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_date
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__create_date
|
||||
|
@ -642,6 +683,8 @@ msgid "Detail Taxes"
|
|||
msgstr "Detalle de impuestos"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__display_name
|
||||
|
@ -931,6 +974,13 @@ msgstr "Agrupar por"
|
|||
msgid "Grouped By"
|
||||
msgstr "Agrupado por"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,help:account_financial_report.field_res_company__age_partner_config_id
|
||||
#: model:ir.model.fields,help:account_financial_report.field_res_config_settings__default_age_partner_config_id
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "Here you can set the intervals that will appear on the Aged Partner Balance."
|
||||
msgstr "Aquí puede configurar los intervalos que aparecerán en el informe de Calidad de la deuda."
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
|
@ -960,6 +1010,8 @@ msgid "Hierarchy Levels to display"
|
|||
msgstr "Niveles de Jerarquía a mostrar"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__id
|
||||
|
@ -1005,6 +1057,13 @@ msgstr ""
|
|||
msgid "Initial balance"
|
||||
msgstr "Saldo inicial"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__age_partner_config_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_res_company__age_partner_config_id
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_res_config_settings__default_age_partner_config_id
|
||||
msgid "Intervals configuration"
|
||||
msgstr "Configuración de intervalos"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
|
@ -1074,6 +1133,8 @@ msgid "Journals"
|
|||
msgstr "Diarios"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard____last_update
|
||||
|
@ -1084,6 +1145,8 @@ msgid "Last Modified on"
|
|||
msgstr "Última modificación en"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__write_uid
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__write_uid
|
||||
|
@ -1125,6 +1188,27 @@ msgstr "Nivel %s"
|
|||
msgid "Limit hierarchy levels"
|
||||
msgstr "Limitar niveles de jerarquía"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__line_ids
|
||||
msgid "Line"
|
||||
msgstr "Línea"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, python-format
|
||||
msgid "Inferior Limit must be greather than zero"
|
||||
msgstr "El límite inferior debe ser mayor que cero"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
|
||||
msgid "Model to set interval lines for Age partner balance report"
|
||||
msgstr "Modelo para establecer líneas de intervalo para el informe de Calidad de deuda"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_account_age_report_configuration
|
||||
msgid "Model to set intervals for Age partner balance report"
|
||||
msgstr "Modelo para establecer intervalos en el informe de Calidad de deudaFalta el Socio"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger.py:0
|
||||
|
@ -1144,10 +1228,19 @@ msgstr "Asiento Objetivo"
|
|||
msgid "Moves"
|
||||
msgstr "Asientos"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, python-format
|
||||
msgid "Must complete Configuration Lines"
|
||||
msgstr "Debe completar las líneas de configuración"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
|
||||
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__name
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__name
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_vat_report_base
|
||||
|
@ -1211,6 +1304,11 @@ msgstr "Sin Postear"
|
|||
msgid "Not due"
|
||||
msgstr "Deuda"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
|
||||
msgid "OCA Aged Report Configuration"
|
||||
msgstr "Configuración del informe Calidad de deuda OCA"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.ui.menu,name:account_financial_report.menu_oca_reports
|
||||
msgid "OCA accounting reports"
|
||||
|
@ -1513,6 +1611,11 @@ msgstr "Fecha de inicio"
|
|||
msgid "Starting account in a range"
|
||||
msgstr "Cuenta inicial en un rango"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__inferior_limit
|
||||
msgid "Inferior Limit"
|
||||
msgstr "Límite inferior"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
|
||||
msgid "Tags"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
from . import account_age_report_configuration
|
||||
from . import account_group
|
||||
from . import account
|
||||
from . import account_move_line
|
||||
from . import ir_actions_report
|
||||
from . import res_config_settings
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
# Copyright 2023 Ernesto García
|
||||
# Copyright 2023 Carolina Fernandez
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class AccountAgeReportConfiguration(models.Model):
|
||||
_name = "account.age.report.configuration"
|
||||
_description = "Model to set intervals for Age partner balance report"
|
||||
|
||||
name = fields.Char(required=True)
|
||||
company_id = fields.Many2one(
|
||||
"res.company", default=lambda self: self.env.company, readonly=True
|
||||
)
|
||||
line_ids = fields.One2many(
|
||||
"account.age.report.configuration.line", "account_age_report_config_id"
|
||||
)
|
||||
|
||||
@api.constrains("line_ids")
|
||||
def _check_line_ids(self):
|
||||
for rec in self:
|
||||
if not rec.line_ids:
|
||||
raise ValidationError(_("Must complete Configuration Lines"))
|
||||
|
||||
|
||||
class AccountAgeReportConfigurationLine(models.Model):
|
||||
_name = "account.age.report.configuration.line"
|
||||
_description = "Model to set interval lines for Age partner balance report"
|
||||
|
||||
name = fields.Char(required=True)
|
||||
account_age_report_config_id = fields.Many2one("account.age.report.configuration")
|
||||
inferior_limit = fields.Integer()
|
||||
|
||||
@api.constrains("inferior_limit")
|
||||
def _check_inferior_limit(self):
|
||||
for rec in self:
|
||||
if rec.inferior_limit <= 0:
|
||||
raise ValidationError(_("Inferior Limit must be greather than zero"))
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
"unique_name_config_combination",
|
||||
"UNIQUE(name,account_age_report_config_id)",
|
||||
_("Name must be unique per report configuration"),
|
||||
)
|
||||
]
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
default_age_partner_config_id = fields.Many2one(
|
||||
"account.age.report.configuration",
|
||||
string="Intervals configuration",
|
||||
default_model="aged.partner.balance.report.wizard",
|
||||
)
|
|
@ -0,0 +1,26 @@
|
|||
To configure dynamic intervals for Aged Partner Balance you need to:
|
||||
|
||||
Go on 'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
||||
|
||||
Click on option 'Configurations' and create new record.
|
||||
|
||||
Create new interval.
|
||||
The name established on line will be the column to display in Aged Partner Balance.
|
||||
Inferior limit established on line is the interval
|
||||
|
||||
Example of configuration inferior limit:
|
||||
|
||||
-> 15
|
||||
-> 30
|
||||
-> 60
|
||||
|
||||
It means the first interval is from 0 to 15, the second from 16 to 30, and the third is 61+.
|
||||
|
||||
Go on 'Invoicing' -> 'Reports' -> 'OCA accounting reports' -> 'Aged Partner Balance'
|
||||
|
||||
When wizard is open, you need to select your interval configuration and print report.
|
||||
|
||||
If you want to get default interval configuration any time you wish to print Aged Partner Report,
|
||||
you can set default interval configuration per company in:
|
||||
|
||||
'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
|
@ -24,6 +24,7 @@
|
|||
* João Marques
|
||||
* Alexandre D. Díaz
|
||||
* Víctor Martínez
|
||||
* Carolina Fernandez
|
||||
|
||||
* `Sygel <https://www.sygel.es>`__:
|
||||
|
||||
|
|
|
@ -14,3 +14,7 @@ currency used in account move lines is properly shown.
|
|||
|
||||
In case that in an account has not been configured a second currency foreign
|
||||
currency balances are not available.
|
||||
|
||||
Invoicing / Settings / Invoicing / OCA Aged Report Configuration you will be able to set
|
||||
dynamic intervals that will appear on the Aged Partner Balance.
|
||||
For further information, check CONFIGURE.rst
|
||||
|
|
|
@ -25,6 +25,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
ag_pb_data[acc_id]["90_days"] = 0.0
|
||||
ag_pb_data[acc_id]["120_days"] = 0.0
|
||||
ag_pb_data[acc_id]["older"] = 0.0
|
||||
for interval_line in self.env.context["age_partner_config"].line_ids:
|
||||
ag_pb_data[acc_id][interval_line] = 0.0
|
||||
return ag_pb_data
|
||||
|
||||
@api.model
|
||||
|
@ -39,6 +41,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
ag_pb_data[acc_id][prt_id]["120_days"] = 0.0
|
||||
ag_pb_data[acc_id][prt_id]["older"] = 0.0
|
||||
ag_pb_data[acc_id][prt_id]["move_lines"] = []
|
||||
for interval_line in self.env.context["age_partner_config"].line_ids:
|
||||
ag_pb_data[acc_id][prt_id][interval_line] = 0.0
|
||||
return ag_pb_data
|
||||
|
||||
@api.model
|
||||
|
@ -47,6 +51,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
):
|
||||
ag_pb_data[acc_id]["residual"] += residual
|
||||
ag_pb_data[acc_id][prt_id]["residual"] += residual
|
||||
interval_lines = self.env.context["age_partner_config"].line_ids
|
||||
today = date_at_object
|
||||
if not due_date or today <= due_date:
|
||||
ag_pb_data[acc_id]["current"] += residual
|
||||
|
@ -66,8 +71,29 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
else:
|
||||
ag_pb_data[acc_id]["older"] += residual
|
||||
ag_pb_data[acc_id][prt_id]["older"] += residual
|
||||
days_difference = abs((today - due_date).days)
|
||||
for index, line in enumerate(interval_lines):
|
||||
lower_limit = 0 if not index else interval_lines[index - 1].inferior_limit
|
||||
next_line = interval_lines[index] if index < len(interval_lines) else None
|
||||
interval_range = self._get_values_for_range_intervals(
|
||||
lower_limit, next_line.inferior_limit
|
||||
)
|
||||
if (
|
||||
days_difference in interval_range
|
||||
or days_difference == line.inferior_limit
|
||||
):
|
||||
ag_pb_data[acc_id][line] += residual
|
||||
ag_pb_data[acc_id][prt_id][line] += residual
|
||||
break
|
||||
return ag_pb_data
|
||||
|
||||
def _get_values_for_range_intervals(self, num1, num2):
|
||||
min_num = min(num1, num2)
|
||||
max_num = max(num1, num2)
|
||||
if abs(num2 - num1) == 1:
|
||||
return [max_num]
|
||||
return list(range(min_num + 1, max_num))
|
||||
|
||||
def _get_account_partial_reconciled(self, company_id, date_at_object):
|
||||
domain = [("max_date", ">", date_at_object), ("company_id", "=", company_id)]
|
||||
fields = [
|
||||
|
@ -235,6 +261,9 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
"older": 0.0,
|
||||
}
|
||||
)
|
||||
interval_lines = self.env.context["age_partner_config"].line_ids
|
||||
for interval_line in interval_lines:
|
||||
ml[interval_line] = 0.0
|
||||
due_date = ml["due_date"]
|
||||
amount = ml["residual"]
|
||||
today = date_at_object
|
||||
|
@ -250,6 +279,19 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
ml["120_days"] += amount
|
||||
else:
|
||||
ml["older"] += amount
|
||||
days_difference = abs((today - due_date).days)
|
||||
for index, interval_line in enumerate(interval_lines):
|
||||
lower_limit = 0 if not index else interval_lines[index - 1].inferior_limit
|
||||
next_line = interval_lines[index] if index < len(interval_lines) else None
|
||||
interval_range = self._get_values_for_range_intervals(
|
||||
lower_limit, next_line.inferior_limit
|
||||
)
|
||||
if (
|
||||
days_difference in interval_range
|
||||
or days_difference == interval_line.inferior_limit
|
||||
):
|
||||
ml[interval_line] += amount
|
||||
break
|
||||
|
||||
def _create_account_list(
|
||||
self,
|
||||
|
@ -261,6 +303,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
date_at_oject,
|
||||
):
|
||||
aged_partner_data = []
|
||||
interval_lines = self.env.context["age_partner_config"].line_ids
|
||||
for account in accounts_data.values():
|
||||
acc_id = account["id"]
|
||||
account.update(
|
||||
|
@ -275,6 +318,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
"partners": [],
|
||||
}
|
||||
)
|
||||
for interval_line in interval_lines:
|
||||
account[interval_line] = ag_pb_data[acc_id][interval_line]
|
||||
for prt_id in ag_pb_data[acc_id]:
|
||||
if isinstance(prt_id, int):
|
||||
partner = {
|
||||
|
@ -287,6 +332,10 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
"120_days": ag_pb_data[acc_id][prt_id]["120_days"],
|
||||
"older": ag_pb_data[acc_id][prt_id]["older"],
|
||||
}
|
||||
for interval_line in interval_lines:
|
||||
partner[interval_line] = ag_pb_data[acc_id][prt_id][
|
||||
interval_line
|
||||
]
|
||||
if show_move_line_details:
|
||||
move_lines = []
|
||||
for ml in ag_pb_data[acc_id][prt_id]["move_lines"]:
|
||||
|
@ -306,6 +355,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
|
||||
@api.model
|
||||
def _calculate_percent(self, aged_partner_data):
|
||||
interval_lines = self.env.context["age_partner_config"].line_ids
|
||||
for account in aged_partner_data:
|
||||
if abs(account["residual"]) > 0.01:
|
||||
total = account["residual"]
|
||||
|
@ -331,6 +381,10 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
),
|
||||
}
|
||||
)
|
||||
for interval_line in interval_lines:
|
||||
account[f"percent_{interval_line.id}"] = abs(
|
||||
round((account[interval_line] / total) * 100, 2)
|
||||
)
|
||||
else:
|
||||
account.update(
|
||||
{
|
||||
|
@ -342,6 +396,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
"percent_older": 0.0,
|
||||
}
|
||||
)
|
||||
for interval_line in interval_lines:
|
||||
account[f"percent_{interval_line.id}"] = 0.0
|
||||
return aged_partner_data
|
||||
|
||||
def _get_report_values(self, docids, data):
|
||||
|
@ -355,12 +411,12 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
date_from = data["date_from"]
|
||||
only_posted_moves = data["only_posted_moves"]
|
||||
show_move_line_details = data["show_move_line_details"]
|
||||
(
|
||||
ag_pb_data,
|
||||
accounts_data,
|
||||
partners_data,
|
||||
journals_data,
|
||||
) = self._get_move_lines_data(
|
||||
aged_partner_configuration = self.env[
|
||||
"account.age.report.configuration"
|
||||
].browse(data["age_partner_config_id"])
|
||||
(ag_pb_data, accounts_data, partners_data, journals_data,) = self.with_context(
|
||||
age_partner_config=aged_partner_configuration
|
||||
)._get_move_lines_data(
|
||||
company_id,
|
||||
account_ids,
|
||||
partner_ids,
|
||||
|
@ -369,7 +425,9 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
only_posted_moves,
|
||||
show_move_line_details,
|
||||
)
|
||||
aged_partner_data = self._create_account_list(
|
||||
aged_partner_data = self.with_context(
|
||||
age_partner_config=aged_partner_configuration
|
||||
)._create_account_list(
|
||||
ag_pb_data,
|
||||
accounts_data,
|
||||
partners_data,
|
||||
|
@ -377,7 +435,9 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
show_move_line_details,
|
||||
date_at_object,
|
||||
)
|
||||
aged_partner_data = self._calculate_percent(aged_partner_data)
|
||||
aged_partner_data = self.with_context(
|
||||
age_partner_config=aged_partner_configuration
|
||||
)._calculate_percent(aged_partner_data)
|
||||
return {
|
||||
"doc_ids": [wizard_id],
|
||||
"doc_model": "open.items.report.wizard",
|
||||
|
@ -388,6 +448,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|||
"only_posted_moves": only_posted_moves,
|
||||
"aged_partner_balance": aged_partner_data,
|
||||
"show_move_lines_details": show_move_line_details,
|
||||
"age_partner_config": aged_partner_configuration,
|
||||
}
|
||||
|
||||
def _get_ml_fields(self):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Author: Julien Coux
|
||||
# Copyright 2016 Camptocamp SA
|
||||
# Copyright 2021 Tecnativa - João Marques
|
||||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import _, models
|
||||
|
@ -20,67 +21,84 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|||
report_name = report_name + suffix
|
||||
return report_name
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
if not report.show_move_line_details:
|
||||
return {
|
||||
0: {"header": _("Partner"), "field": "name", "width": 70},
|
||||
1: {
|
||||
"header": _("Residual"),
|
||||
"field": "residual",
|
||||
"field_footer_total": "residual",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
2: {
|
||||
"header": _("Current"),
|
||||
"field": "current",
|
||||
"field_footer_total": "current",
|
||||
"field_footer_percent": "percent_current",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
3: {
|
||||
"header": _("Age ≤ 30 d."),
|
||||
"field": "30_days",
|
||||
"field_footer_total": "30_days",
|
||||
"field_footer_percent": "percent_30_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
4: {
|
||||
"header": _("Age ≤ 60 d."),
|
||||
"field": "60_days",
|
||||
"field_footer_total": "60_days",
|
||||
"field_footer_percent": "percent_60_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
5: {
|
||||
"header": _("Age ≤ 90 d."),
|
||||
"field": "90_days",
|
||||
"field_footer_total": "90_days",
|
||||
"field_footer_percent": "percent_90_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
6: {
|
||||
"header": _("Age ≤ 120 d."),
|
||||
"field": "120_days",
|
||||
"field_footer_total": "120_days",
|
||||
"field_footer_percent": "percent_120_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
7: {
|
||||
"header": _("Older"),
|
||||
"field": "older",
|
||||
"field_footer_total": "older",
|
||||
"field_footer_percent": "percent_older",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
def _get_report_columns_without_move_line_details(self, report, column_index):
|
||||
report_columns = {
|
||||
0: {"header": _("Partner"), "field": "name", "width": 70},
|
||||
1: {
|
||||
"header": _("Residual"),
|
||||
"field": "residual",
|
||||
"field_footer_total": "residual",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
2: {
|
||||
"header": _("Current"),
|
||||
"field": "current",
|
||||
"field_footer_total": "current",
|
||||
"field_footer_percent": "percent_current",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
}
|
||||
if not report.age_partner_config_id:
|
||||
report_columns.update(
|
||||
{
|
||||
3: {
|
||||
"header": _("Age ≤ 30 d."),
|
||||
"field": "30_days",
|
||||
"field_footer_total": "30_days",
|
||||
"field_footer_percent": "percent_30_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
4: {
|
||||
"header": _("Age ≤ 60 d."),
|
||||
"field": "60_days",
|
||||
"field_footer_total": "60_days",
|
||||
"field_footer_percent": "percent_60_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
5: {
|
||||
"header": _("Age ≤ 90 d."),
|
||||
"field": "90_days",
|
||||
"field_footer_total": "90_days",
|
||||
"field_footer_percent": "percent_90_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
6: {
|
||||
"header": _("Age ≤ 120 d."),
|
||||
"field": "120_days",
|
||||
"field_footer_total": "120_days",
|
||||
"field_footer_percent": "percent_120_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
7: {
|
||||
"header": _("Older"),
|
||||
"field": "older",
|
||||
"field_footer_total": "older",
|
||||
"field_footer_percent": "percent_older",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
}
|
||||
)
|
||||
for interval in report.age_partner_config_id.line_ids:
|
||||
report_columns[column_index] = {
|
||||
"header": interval.name,
|
||||
"field": interval,
|
||||
"field_footer_total": interval,
|
||||
"field_footer_percent": f"percent_{interval.id}",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
}
|
||||
return {
|
||||
column_index += 1
|
||||
return report_columns
|
||||
|
||||
def _get_report_columns_with_move_line_details(self, report, column_index):
|
||||
report_columns = {
|
||||
0: {"header": _("Date"), "field": "date", "width": 11},
|
||||
1: {"header": _("Entry"), "field": "entry", "width": 18},
|
||||
2: {"header": _("Journal"), "field": "journal", "width": 8},
|
||||
|
@ -105,52 +123,75 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
9: {
|
||||
"header": _("Age ≤ 30 d."),
|
||||
"field": "30_days",
|
||||
"field_footer_total": "30_days",
|
||||
"field_footer_percent": "percent_30_days",
|
||||
"field_final_balance": "30_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
10: {
|
||||
"header": _("Age ≤ 60 d."),
|
||||
"field": "60_days",
|
||||
"field_footer_total": "60_days",
|
||||
"field_footer_percent": "percent_60_days",
|
||||
"field_final_balance": "60_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
11: {
|
||||
"header": _("Age ≤ 90 d."),
|
||||
"field": "90_days",
|
||||
"field_footer_total": "90_days",
|
||||
"field_footer_percent": "percent_90_days",
|
||||
"field_final_balance": "90_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
12: {
|
||||
"header": _("Age ≤ 120 d."),
|
||||
"field": "120_days",
|
||||
"field_footer_total": "120_days",
|
||||
"field_footer_percent": "percent_120_days",
|
||||
"field_final_balance": "120_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
13: {
|
||||
"header": _("Older"),
|
||||
"field": "older",
|
||||
"field_footer_total": "older",
|
||||
"field_footer_percent": "percent_older",
|
||||
"field_final_balance": "older",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
}
|
||||
if not report.age_partner_config_id:
|
||||
report_columns.update(
|
||||
{
|
||||
9: {
|
||||
"header": _("Age ≤ 30 d."),
|
||||
"field": "30_days",
|
||||
"field_footer_total": "30_days",
|
||||
"field_footer_percent": "percent_30_days",
|
||||
"field_final_balance": "30_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
10: {
|
||||
"header": _("Age ≤ 60 d."),
|
||||
"field": "60_days",
|
||||
"field_footer_total": "60_days",
|
||||
"field_footer_percent": "percent_60_days",
|
||||
"field_final_balance": "60_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
11: {
|
||||
"header": _("Age ≤ 90 d."),
|
||||
"field": "90_days",
|
||||
"field_footer_total": "90_days",
|
||||
"field_footer_percent": "percent_90_days",
|
||||
"field_final_balance": "90_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
12: {
|
||||
"header": _("Age ≤ 120 d."),
|
||||
"field": "120_days",
|
||||
"field_footer_total": "120_days",
|
||||
"field_footer_percent": "percent_120_days",
|
||||
"field_final_balance": "120_days",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
13: {
|
||||
"header": _("Older"),
|
||||
"field": "older",
|
||||
"field_footer_total": "older",
|
||||
"field_footer_percent": "percent_older",
|
||||
"field_final_balance": "older",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
},
|
||||
}
|
||||
)
|
||||
for interval in report.age_partner_config_id.line_ids:
|
||||
report_columns[column_index] = {
|
||||
"header": interval.name,
|
||||
"field": interval,
|
||||
"field_footer_total": interval,
|
||||
"field_footer_percent": f"percent_{interval.id}",
|
||||
"type": "amount",
|
||||
"width": 14,
|
||||
}
|
||||
column_index += 1
|
||||
return report_columns
|
||||
|
||||
def _get_report_columns(self, report):
|
||||
if not report.show_move_line_details:
|
||||
return self._get_report_columns_without_move_line_details(
|
||||
report, column_index=3
|
||||
)
|
||||
return self._get_report_columns_with_move_line_details(report, column_index=9)
|
||||
|
||||
def _get_report_filters(self, report):
|
||||
return [
|
||||
|
|
|
@ -116,16 +116,22 @@
|
|||
<div class="act_as_cell" style="width: 9.64%;">Residual</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">Not due</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">1 - 30 d.</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">31 - 60 d.</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">61 - 90 d.</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">91 - 120 d.</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">> 120 d.</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">1 - 30 d.</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">31 - 60 d.</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">61 - 90 d.</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">91 - 120 d.</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell" style="width: 9.64%;">> 120 d.</div>
|
||||
</t>
|
||||
<!--## dynamic columns-->
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell"><span t-out="column_dynamic.name" /></div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -143,48 +149,58 @@
|
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## current-->
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
<span
|
||||
t-esc="partner['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-out="partner[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
<template id="report_aged_partner_balance_move_lines">
|
||||
|
@ -218,28 +234,36 @@
|
|||
<div class="act_as_cell" style="width: 6.00%;">Residual</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">Current</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 30
|
||||
d.
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 60
|
||||
d.
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 90
|
||||
d.
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 120
|
||||
d.
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">Older</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 30
|
||||
d.
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 60
|
||||
d.
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 90
|
||||
d.
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">
|
||||
Age ≤ 120
|
||||
d.
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell" style="width: 6.00%;">Older</div>
|
||||
</t>
|
||||
<!--## current-->
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell">
|
||||
<span t-esc="column_dynamic.name" />
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Display each move lines -->
|
||||
|
@ -333,126 +357,149 @@
|
|||
/>
|
||||
</span>
|
||||
</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['current'] == 0">
|
||||
<span
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['current'] == 0">
|
||||
<span
|
||||
t-esc="line['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
<t
|
||||
t-out="line['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['30_days'] == 0">
|
||||
<span
|
||||
t-esc="line['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['30_days']"
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['30_days'] == 0">
|
||||
<span
|
||||
t-esc="line['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['60_days'] == 0">
|
||||
<span
|
||||
t-esc="line['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['60_days']"
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['60_days'] == 0">
|
||||
<span
|
||||
t-esc="line['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['90_days'] == 0">
|
||||
<span
|
||||
t-esc="line['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['90_days']"
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['90_days'] == 0">
|
||||
<span
|
||||
t-esc="line['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['120_days'] == 0">
|
||||
<span
|
||||
t-esc="line['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['120_days']"
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['120_days'] == 0">
|
||||
<span
|
||||
t-esc="line['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['older'] == 0">
|
||||
<span
|
||||
t-esc="line['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['older']"
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line['older'] == 0">
|
||||
<span
|
||||
t-esc="line['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="line[column_dynamic] == 0">
|
||||
<span
|
||||
t-esc="line[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span
|
||||
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-out="line[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
@ -475,48 +522,58 @@
|
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%;">
|
||||
<span
|
||||
t-esc="partner_cumul_line['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="partner_cumul_line[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -534,48 +591,58 @@
|
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span
|
||||
t-esc="account['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="account[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="show_move_line_details">
|
||||
<!--## total-->
|
||||
|
@ -589,48 +656,58 @@
|
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['current']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['30_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['60_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['90_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['120_days']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span
|
||||
t-esc="account['older']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span
|
||||
t-esc="account[column_dynamic]"
|
||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_row" style="font-weight: bold; font-style: italic;">
|
||||
|
@ -642,33 +719,42 @@
|
|||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_current']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_30_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_60_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_90_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_120_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_older']" />
|
||||
%
|
||||
</div>
|
||||
%
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_30_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_60_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_90_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_120_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 9.64%;">
|
||||
<span t-esc="account['percent_older']" />
|
||||
%
|
||||
</div>
|
||||
</t>
|
||||
<!--## current-->
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span t-esc="account['percent_'+str(column_dynamic.id)]" />
|
||||
%
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="show_move_line_details">
|
||||
<!--## total-->
|
||||
|
@ -680,34 +766,43 @@
|
|||
<!--## current-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_current']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_30_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_60_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_90_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_120_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_older']" />
|
||||
%
|
||||
</div>
|
||||
</t>
|
||||
%
|
||||
</div>
|
||||
<t t-if="not age_partner_config">
|
||||
<!--## age_30_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_30_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_60_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_60_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_90_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_90_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## age_120_days-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_120_days']" />
|
||||
%
|
||||
</div>
|
||||
<!--## older-->
|
||||
<div class="act_as_cell amount" style="width: 6.00%">
|
||||
<span t-esc="account['percent_older']" />
|
||||
%
|
||||
</div>
|
||||
</t>
|
||||
<!--## current-->
|
||||
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
|
||||
<div class="act_as_cell amount">
|
||||
<span t-esc="account['percent_'+str(column_dynamic.id)]" />
|
||||
%
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -5,3 +5,5 @@ access_journal_ledger_report_wizard,access_journal_ledger_report_wizard,model_jo
|
|||
access_open_items_report_wizard,access_open_items_report_wizard,model_open_items_report_wizard,base.group_user,1,1,1,1
|
||||
access_trial_balance_report_wizard,access_trial_balance_report_wizard,model_trial_balance_report_wizard,base.group_user,1,1,1,1
|
||||
access_vat_report_wizard,access_vat_report_wizard,model_vat_report_wizard,base.group_user,1,1,1,1
|
||||
access_account_age_report_configuration,access_account_age_report_configuration,model_account_age_report_configuration,base.group_user,1,1,1,1
|
||||
access_account_age_report_configuration_line,access_account_age_report_configuration_line,model_account_age_report_configuration_line,base.group_user,1,1,1,1
|
||||
|
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.rule" id="account_age_report_configuration_rule">
|
||||
<field name="name">Account age report configuration rule</field>
|
||||
<field name="model_id" ref="model_account_age_report_configuration" />
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
|
@ -366,7 +367,7 @@ ul.auto-toc {
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:cef68d51599f099ae394d2d6b98944bf45323ba4bf3e88483aafc1697ade7833
|
||||
!! source digest: sha256:fcb9a885dbf2d1e1ec9ca61d60bc1f1e4f77c99b18d3a3c3747c7d33a2901fd8
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds a set of financial reports. They are accessible under
|
||||
|
@ -384,27 +385,50 @@ currency set up in account in order to display balances. Moreover, any foreign
|
|||
currency used in account move lines is properly shown.</p>
|
||||
<p>In case that in an account has not been configured a second currency foreign
|
||||
currency balances are not available.</p>
|
||||
<p>Invoicing / Settings / Invoicing / OCA Aged Report Configuration you will be able to set
|
||||
dynamic intervals that will appear on the Aged Partner Balance.
|
||||
For further information, check CONFIGURE.rst</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-1">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#changelog" id="toc-entry-2">Changelog</a><ul>
|
||||
<li><a class="reference internal" href="#section-1" id="toc-entry-3">11.0.2.5.0 (2019-04-26)</a></li>
|
||||
<li><a class="reference internal" href="#section-2" id="toc-entry-4">11.0.2.4.1 (2019-01-08)</a></li>
|
||||
<li><a class="reference internal" href="#section-3" id="toc-entry-5">11.0.2.3.1 (2018-11-29)</a></li>
|
||||
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
|
||||
<li><a class="reference internal" href="#section-1" id="toc-entry-4">11.0.2.5.0 (2019-04-26)</a></li>
|
||||
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.2.4.1 (2019-01-08)</a></li>
|
||||
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.2.3.1 (2018-11-29)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-6">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-7">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-8">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-9">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||
<p>To configure dynamic intervals for Aged Partner Balance you need to:</p>
|
||||
<p>Go on ‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
||||
<p>Click on option ‘Configurations’ and create new record.</p>
|
||||
<p>Create new interval.
|
||||
The name established on line will be the column to display in Aged Partner Balance.
|
||||
Inferior limit established on line is the interval</p>
|
||||
<p>Example of configuration inferior limit:</p>
|
||||
<p>-> 15
|
||||
-> 30
|
||||
-> 60</p>
|
||||
<p>It means the first interval is from 0 to 15, the second from 16 to 30, and the third is 61+.</p>
|
||||
<p>Go on ‘Invoicing’ -> ‘Reports’ -> ‘OCA accounting reports’ -> ‘Aged Partner Balance’</p>
|
||||
<p>When wizard is open, you need to select your interval configuration and print report.</p>
|
||||
<p>If you want to get default interval configuration any time you wish to print Aged Partner Report,
|
||||
you can set default interval configuration per company in:</p>
|
||||
<p>‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
||||
<ul class="simple">
|
||||
<li>‘VAT Report’ is valid only for cases where it’s met that for each
|
||||
Tax defined: all the “Account tags” of all the
|
||||
|
@ -416,15 +440,15 @@ in “Target Moves” field in a wizard</li>
|
|||
</ul>
|
||||
</div>
|
||||
<div class="section" id="changelog">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Changelog</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
|
||||
<div class="section" id="section-1">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">11.0.2.5.0 (2019-04-26)</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">11.0.2.5.0 (2019-04-26)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>In the Trial Balance you have an option to hide parent hierarchy levels</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="section-2">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">11.0.2.4.1 (2019-01-08)</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.4.1 (2019-01-08)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Handle better multicompany behaviour</li>
|
||||
<li>Improve how title appears in the reports</li>
|
||||
|
@ -432,7 +456,7 @@ in “Target Moves” field in a wizard</li>
|
|||
</ul>
|
||||
</div>
|
||||
<div class="section" id="section-3">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.3.1 (2018-11-29)</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">11.0.2.3.1 (2018-11-29)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>In the Trial Balance you can apply a filter by hierarchy levels</li>
|
||||
<li>In the General Ledger you can apply a filter by Analytic Tag</li>
|
||||
|
@ -441,7 +465,7 @@ in “Target Moves” field in a wizard</li>
|
|||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
|
@ -449,9 +473,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#toc-entry-7">Credits</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Authors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp SA</li>
|
||||
<li>initOS GmbH</li>
|
||||
|
@ -460,7 +484,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@forgeflow.com">jordi.ballester@forgeflow.com</a>></li>
|
||||
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
||||
|
@ -487,6 +511,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
<li>João Marques</li>
|
||||
<li>Alexandre D. Díaz</li>
|
||||
<li>Víctor Martínez</li>
|
||||
<li>Carolina Fernandez</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
|
||||
|
@ -502,7 +527,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
April 2016.</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
|
|
|
@ -7,3 +7,4 @@ from . import test_journal_ledger
|
|||
from . import test_open_items
|
||||
from . import test_trial_balance
|
||||
from . import test_vat_report
|
||||
from . import test_age_report_configuration
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestAccountAgeReportConfiguration(common.TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.account_age_report_config = cls.env[
|
||||
"account.age.report.configuration"
|
||||
].create(
|
||||
{
|
||||
"name": "Intervals configuration",
|
||||
"line_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"name": "1-30",
|
||||
"inferior_limit": 30,
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
def test_check_line_ids_constraint(self):
|
||||
with self.assertRaises(ValidationError):
|
||||
self.env["account.age.report.configuration"].create(
|
||||
{"name": "Interval configuration", "line_ids": False}
|
||||
)
|
||||
|
||||
def test_check_lower_inferior_limit_constraint(self):
|
||||
with self.assertRaises(ValidationError):
|
||||
self.account_age_report_config.line_ids.inferior_limit = 0
|
||||
|
||||
with self.assertRaises(ValidationError):
|
||||
self.account_age_report_config.line_ids.inferior_limit = -1
|
|
@ -1,4 +1,5 @@
|
|||
# Copyright 2021 Simone Rubino - Agile Business Group
|
||||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests import TransactionCase
|
||||
|
@ -20,6 +21,36 @@ class TestAgedPartnerBalance(TransactionCase):
|
|||
)
|
||||
)
|
||||
cls.wizard_model = cls.env["aged.partner.balance.report.wizard"]
|
||||
# Check that report is produced correctly
|
||||
cls.wizard_with_line_details = cls.wizard_model.create(
|
||||
{
|
||||
"show_move_line_details": True,
|
||||
"receivable_accounts_only": True,
|
||||
}
|
||||
)
|
||||
cls.wizard_without_line_details = cls.wizard_model.create(
|
||||
{
|
||||
"show_move_line_details": False,
|
||||
"receivable_accounts_only": True,
|
||||
}
|
||||
)
|
||||
cls.account_age_report_config = cls.env[
|
||||
"account.age.report.configuration"
|
||||
].create(
|
||||
{
|
||||
"name": "Intervals configuration",
|
||||
"line_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"name": "1-30",
|
||||
"inferior_limit": 30,
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.account001 = cls.env["account.account"].create(
|
||||
{
|
||||
"code": "001",
|
||||
|
@ -29,14 +60,10 @@ class TestAgedPartnerBalance(TransactionCase):
|
|||
}
|
||||
)
|
||||
|
||||
def test_report(self):
|
||||
def test_report_without_aged_report_configuration(self):
|
||||
"""Check that report is produced correctly."""
|
||||
wizard = self.wizard_model.create(
|
||||
{
|
||||
"show_move_line_details": True,
|
||||
"receivable_accounts_only": True,
|
||||
}
|
||||
)
|
||||
wizard = self.wizard_with_line_details
|
||||
|
||||
wizard.onchange_type_accounts_only()
|
||||
data = wizard._prepare_report_aged_partner_balance()
|
||||
|
||||
|
@ -52,6 +79,22 @@ class TestAgedPartnerBalance(TransactionCase):
|
|||
)
|
||||
self.assertTrue(result)
|
||||
|
||||
second_wizard = self.wizard_without_line_details
|
||||
second_wizard.onchange_type_accounts_only()
|
||||
data = second_wizard._prepare_report_aged_partner_balance()
|
||||
|
||||
# Simulate web client behavior:
|
||||
# default value is a datetime.date but web client sends back strings
|
||||
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
||||
result = test_reports.try_report(
|
||||
self.env.cr,
|
||||
self.env.uid,
|
||||
"account_financial_report.aged_partner_balance",
|
||||
second_wizard.ids,
|
||||
data=data,
|
||||
)
|
||||
self.assertTrue(result)
|
||||
|
||||
def test_all_accounts_loaded(self):
|
||||
# Tests if all accounts are loaded when the account_code_ fields changed
|
||||
all_accounts = self.env["account.account"].search(
|
||||
|
@ -73,3 +116,41 @@ class TestAgedPartnerBalance(TransactionCase):
|
|||
]
|
||||
self.assertEqual(len(aged_partner_balance_code_set), len(all_accounts_code_set))
|
||||
self.assertTrue(aged_partner_balance_code_set == all_accounts_code_set)
|
||||
|
||||
def test_report_with_aged_report_configuration(self):
|
||||
"""Check that report is produced correctly."""
|
||||
wizard = self.wizard_with_line_details
|
||||
wizard.age_partner_config_id = self.account_age_report_config.id
|
||||
|
||||
wizard.onchange_type_accounts_only()
|
||||
data = wizard._prepare_report_aged_partner_balance()
|
||||
|
||||
# Simulate web client behavior:
|
||||
# default value is a datetime.date but web client sends back strings
|
||||
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
||||
result = test_reports.try_report(
|
||||
self.env.cr,
|
||||
self.env.uid,
|
||||
"account_financial_report.aged_partner_balance",
|
||||
wizard.ids,
|
||||
data=data,
|
||||
)
|
||||
self.assertTrue(result)
|
||||
|
||||
second_wizard = self.wizard_without_line_details
|
||||
second_wizard.age_partner_config_id = self.account_age_report_config.id
|
||||
|
||||
second_wizard.onchange_type_accounts_only()
|
||||
data = second_wizard._prepare_report_aged_partner_balance()
|
||||
|
||||
# Simulate web client behavior:
|
||||
# default value is a datetime.date but web client sends back strings
|
||||
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
||||
result = test_reports.try_report(
|
||||
self.env.cr,
|
||||
self.env.uid,
|
||||
"account_financial_report.aged_partner_balance",
|
||||
second_wizard.ids,
|
||||
data=data,
|
||||
)
|
||||
self.assertTrue(result)
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Ernesto Garcia <ernesto.garcia@tecnativa.com>
|
||||
Copyright 2023 Carolina Fernandez <carolina.fernandez@tecnativa.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="aged_partner_report_configuration_form" model="ir.ui.view">
|
||||
<field name="name">Age partner report configuration form</field>
|
||||
<field name="model">account.age.report.configuration</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
<field name="line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="name" />
|
||||
<field name="inferior_limit" />
|
||||
</tree>
|
||||
</field>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="aged_partner_report_configuration_tree" model="ir.ui.view">
|
||||
<field name="name">Age partner report configuration tree</field>
|
||||
<field name="model">account.age.report.configuration</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="company_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_aged_partner_report_configuration" model="ir.actions.act_window">
|
||||
<field name="name">Age Partner Report Configuration</field>
|
||||
<field name="res_model">account.age.report.configuration</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='analytic']" position="after">
|
||||
<div id="oca_aged_report_config">
|
||||
<h2>OCA Aged Report Configuration</h2>
|
||||
<div
|
||||
class="row mt16 o_settings_container"
|
||||
name="main_aged_report_setting_container"
|
||||
>
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
id="main_aged_report_config"
|
||||
>
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span
|
||||
class="o_form_label"
|
||||
>Intervals configuration</span>
|
||||
<div class="text-muted">
|
||||
Here you can set the intervals that will appear on the Aged Partner Balance.
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label
|
||||
for="default_age_partner_config_id"
|
||||
class="col-lg-3 o_light_label"
|
||||
/>
|
||||
<field
|
||||
name="default_age_partner_config_id"
|
||||
options="{'no_create_edit': True, 'no_open': True}"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<button
|
||||
type="action"
|
||||
name="%(account_financial_report.action_aged_partner_report_configuration)d"
|
||||
string="Configurations"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
|
@ -40,6 +40,9 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|||
comodel_name="account.account",
|
||||
help="Ending account in a range",
|
||||
)
|
||||
age_partner_config_id = fields.Many2one(
|
||||
"account.age.report.configuration", string="Intervals configuration"
|
||||
)
|
||||
|
||||
@api.onchange("account_code_from", "account_code_to")
|
||||
def on_change_account_range(self):
|
||||
|
@ -140,6 +143,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|||
"partner_ids": self.partner_ids.ids,
|
||||
"show_move_line_details": self.show_move_line_details,
|
||||
"account_financial_report_lang": self.env.lang,
|
||||
"age_partner_config_id": self.age_partner_config_id.id,
|
||||
}
|
||||
|
||||
def _export(self, report_type):
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
/>
|
||||
</group>
|
||||
<group name="account_filter" col="4">
|
||||
<label for="age_partner_config_id" />
|
||||
<field name="age_partner_config_id" nolabel="1" />
|
||||
<label for="account_ids" colspan="4" />
|
||||
<field name="receivable_accounts_only" />
|
||||
<field name="payable_accounts_only" />
|
||||
|
@ -68,19 +70,16 @@
|
|||
default_focus="1"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button
|
||||
name="button_export_pdf"
|
||||
string="Export PDF"
|
||||
type="object"
|
||||
/>
|
||||
or
|
||||
<button
|
||||
name="button_export_xlsx"
|
||||
string="Export XLSX"
|
||||
type="object"
|
||||
/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue