[17.0][IMP] account_financial_report: Set custom intervales in aged report
This commit is contained in:
committed by
chaule97
parent
18a8cef8af
commit
6d6937346a
@@ -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": [
|
||||
|
||||
@@ -6,6 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-04-15 11:26+0000\n"
|
||||
"PO-Revision-Date: 2024-04-15 11:26+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -49,6 +51,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 +96,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,11 +162,16 @@ 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 ""
|
||||
"Age ??? 120\n"
|
||||
" d."
|
||||
"Age ≤ 120\n"
|
||||
" d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
@@ -162,14 +179,14 @@ msgstr ""
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#, python-format
|
||||
msgid "Age ??? 120 d."
|
||||
msgid "Age ≤ 120 d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
msgid ""
|
||||
"Age ??? 30\n"
|
||||
" d."
|
||||
"Age ≤ 30\n"
|
||||
" d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
@@ -177,14 +194,14 @@ msgstr ""
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#, python-format
|
||||
msgid "Age ??? 30 d."
|
||||
msgid "Age ≤ 30 d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
msgid ""
|
||||
"Age ??? 60\n"
|
||||
" d."
|
||||
"Age ≤ 60\n"
|
||||
" d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
@@ -192,14 +209,14 @@ msgstr ""
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#, python-format
|
||||
msgid "Age ??? 60 d."
|
||||
msgid "Age ≤ 60 d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
msgid ""
|
||||
"Age ??? 90\n"
|
||||
" d."
|
||||
"Age ≤ 90\n"
|
||||
" d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
@@ -207,7 +224,7 @@ msgstr ""
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#, python-format
|
||||
msgid "Age ??? 90 d."
|
||||
msgid "Age ≤ 90 d."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
@@ -419,6 +436,7 @@ 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
|
||||
@@ -436,6 +454,18 @@ 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_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
|
||||
@@ -446,6 +476,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 +669,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 +950,12 @@ msgstr ""
|
||||
msgid "Grouped By"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#: 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 +985,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
|
||||
@@ -961,6 +1003,18 @@ msgid ""
|
||||
"webkit one only), only centralized amounts per period."
|
||||
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
|
||||
#. odoo-python
|
||||
#: 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_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_lines_header
|
||||
msgid ""
|
||||
@@ -987,6 +1041,12 @@ 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_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 +1116,8 @@ msgid "Journals"
|
||||
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
|
||||
@@ -1066,6 +1128,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
|
||||
@@ -1097,6 +1161,11 @@ 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
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger.py:0
|
||||
@@ -1108,6 +1177,16 @@ msgstr ""
|
||||
msgid "Missing Partner"
|
||||
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
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__move_target
|
||||
msgid "Move Target"
|
||||
@@ -1118,10 +1197,19 @@ msgstr ""
|
||||
msgid "Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: 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
|
||||
@@ -1129,6 +1217,13 @@ msgstr ""
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, python-format
|
||||
msgid "Name must be unique per report configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
|
||||
@@ -1180,6 +1275,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"
|
||||
|
||||
@@ -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
|
||||
@@ -427,6 +437,7 @@ msgstr "C??digo"
|
||||
#. 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
|
||||
@@ -444,6 +455,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 "Ajustes 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 +477,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
|
||||
@@ -468,6 +493,7 @@ msgstr "Creado el"
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
|
||||
#: 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_table_header
|
||||
@@ -528,6 +554,7 @@ msgstr "Moneda"
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
#, python-format
|
||||
msgid "Current"
|
||||
@@ -618,6 +645,7 @@ msgstr "Hasta"
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
|
||||
#: 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_table_header
|
||||
@@ -642,6 +670,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
|
||||
@@ -727,6 +757,9 @@ msgstr "Cuenta final en un rango"
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_ending_cumul
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_lines_header
|
||||
#, python-format
|
||||
@@ -773,6 +806,7 @@ msgstr "N??mero de asiento"
|
||||
#. module: account_financial_report
|
||||
#. odoo-javascript
|
||||
#: code:addons/account_financial_report/static/src/xml/report.xml:0
|
||||
#: code:addons/account_financial_report/static/src/xml/report.xml:0
|
||||
#, python-format
|
||||
msgid "Export"
|
||||
msgstr "Exportar"
|
||||
@@ -918,8 +952,7 @@ msgid ""
|
||||
" only one unaffected earnings account."
|
||||
msgstr ""
|
||||
"El Libro mayor solo se puede calcular si la empresa seleccionada tiene \n"
|
||||
" solo una cuenta "
|
||||
"de resultados no afectados."
|
||||
" solo una cuenta de resultados no afectados."
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__group_option
|
||||
@@ -931,6 +964,12 @@ msgstr "Agrupar por"
|
||||
msgid "Grouped By"
|
||||
msgstr "Agrupado por"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: 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 +999,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
|
||||
@@ -978,6 +1019,18 @@ msgstr ""
|
||||
"Si se marca, no se mostrar??n detalles en el informe del libro mayor (solo "
|
||||
"el webkit), solo importes centralizados por per??odo."
|
||||
|
||||
#. 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
|
||||
#. odoo-python
|
||||
#: 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_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_lines_header
|
||||
msgid ""
|
||||
@@ -1000,11 +1053,20 @@ msgstr ""
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
|
||||
#, python-format
|
||||
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_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 +1136,8 @@ msgid "Journals"
|
||||
msgstr "Diarios"
|
||||
|
||||
#. 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
|
||||
@@ -1084,6 +1148,8 @@ msgid "Last Updated by"
|
||||
msgstr "??ltima actualizaci??n por"
|
||||
|
||||
#. 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
|
||||
@@ -1115,15 +1181,32 @@ 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
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger.py:0
|
||||
#: code:addons/account_financial_report/report/general_ledger.py:0
|
||||
#: code:addons/account_financial_report/report/open_items.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance.py:0
|
||||
#, python-format
|
||||
msgid "Missing Partner"
|
||||
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 "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 deuda"
|
||||
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__move_target
|
||||
msgid "Move Target"
|
||||
@@ -1134,10 +1217,19 @@ msgstr "Asiento Objetivo"
|
||||
msgid "Moves"
|
||||
msgstr "Asientos"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: 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
|
||||
@@ -1145,6 +1237,13 @@ msgstr "Asientos"
|
||||
msgid "Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/models/account_age_report_configuration.py:0
|
||||
#, 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
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
|
||||
@@ -1195,6 +1294,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"
|
||||
@@ -1203,6 +1307,7 @@ msgstr "Informes de contabilidad OCA"
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
#, python-format
|
||||
msgid "Older"
|
||||
@@ -1271,6 +1376,7 @@ msgstr "Inicial"
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
|
||||
@@ -1344,6 +1450,7 @@ msgstr "Porcentajes"
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_lines_header
|
||||
#, python-format
|
||||
msgid "Period balance"
|
||||
@@ -1410,11 +1517,12 @@ msgstr "Ref - Etiqueta"
|
||||
#. module: account_financial_report
|
||||
#: model:ir.model,name:account_financial_report.model_ir_actions_report
|
||||
msgid "Report Action"
|
||||
msgstr "Acci??n Informe"
|
||||
msgstr "Acción de informe"
|
||||
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_lines_header
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
|
||||
@@ -1817,6 +1925,7 @@ msgstr "Cuenta con Nombre"
|
||||
#. module: account_financial_report
|
||||
#. odoo-python
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
|
||||
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_filters
|
||||
|
||||
@@ -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"),
|
||||
)
|
||||
]
|
||||
14
account_financial_report/models/res_config_settings.py
Normal file
14
account_financial_report/models/res_config_settings.py
Normal file
@@ -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",
|
||||
)
|
||||
26
account_financial_report/readme/CONFIGURE.md
Normal file
26
account_financial_report/readme/CONFIGURE.md
Normal file
@@ -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'.
|
||||
@@ -23,6 +23,7 @@
|
||||
- Jo??o Marques
|
||||
- Alexandre D. D??az
|
||||
- V??ctor Mart??nez
|
||||
- Carolina Fernandez
|
||||
- [Sygel](https://www.sygel.es):
|
||||
- Harald Panten
|
||||
- Valentin Vinagre
|
||||
|
||||
@@ -15,3 +15,7 @@ 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,34 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
||||
else:
|
||||
ag_pb_data[acc_id]["older"] += residual
|
||||
ag_pb_data[acc_id][prt_id]["older"] += residual
|
||||
if due_date:
|
||||
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 +266,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 +284,24 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
||||
ml["120_days"] += amount
|
||||
else:
|
||||
ml["older"] += amount
|
||||
if due_date:
|
||||
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 +313,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 +328,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 +342,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 +365,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 +391,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 +406,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 +421,17 @@ 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"]
|
||||
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._get_move_lines_data(
|
||||
) = self.with_context(
|
||||
age_partner_config=aged_partner_configuration
|
||||
)._get_move_lines_data(
|
||||
company_id,
|
||||
account_ids,
|
||||
partner_ids,
|
||||
@@ -369,7 +440,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 +450,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 +463,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):
|
||||
|
||||
@@ -20,67 +20,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 +122,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
|
||||
|
||||
|
8
account_financial_report/security/security.xml
Normal file
8
account_financial_report/security/security.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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', 'in', company_ids + [False])]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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,42 @@
|
||||
# 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, tagged
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
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,10 +1,11 @@
|
||||
# Copyright 2021 Simone Rubino - Agile Business Group
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests import TransactionCase
|
||||
from odoo.tests import TransactionCase, tagged
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, test_reports
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestAgedPartnerBalance(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -20,15 +21,40 @@ class TestAgedPartnerBalance(TransactionCase):
|
||||
)
|
||||
)
|
||||
cls.wizard_model = cls.env["aged.partner.balance.report.wizard"]
|
||||
|
||||
def test_report(self):
|
||||
"""Check that report is produced correctly."""
|
||||
wizard = self.wizard_model.create(
|
||||
# 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,
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
def test_report_without_aged_report_configuration(self):
|
||||
"""Check that report is produced correctly."""
|
||||
wizard = self.wizard_with_line_details
|
||||
wizard.onchange_type_accounts_only()
|
||||
data = wizard._prepare_report_aged_partner_balance()
|
||||
|
||||
@@ -43,3 +69,56 @@ class TestAgedPartnerBalance(TransactionCase):
|
||||
data=data,
|
||||
)
|
||||
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_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>
|
||||
51
account_financial_report/view/res_config_settings_views.xml
Normal file
51
account_financial_report/view/res_config_settings_views.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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="//block[@id='analytic']" position="after">
|
||||
<block
|
||||
title="OCA Aged Report Configuration"
|
||||
id="oca_aged_report_config"
|
||||
>
|
||||
<div
|
||||
id="main_oca_aged_report_config"
|
||||
class="col-12 col-lg-12 o_setting_box"
|
||||
>
|
||||
<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>
|
||||
</block>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user