Skip to content

Commit

Permalink
[IMP] account_financial_report: Set grouped_by as required with non g…
Browse files Browse the repository at this point in the history
…rouped item description. Fixes display of report when no agroupation is wanted
  • Loading branch information
sergiobstoj committed Dec 31, 2024
1 parent 8e6d9de commit 3d00541
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion account_financial_report/wizard/general_ledger_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ class GeneralLedgerReportWizard(models.TransientModel):
help="Ending account in a range",
)
grouped_by = fields.Selection(
selection=[("", "None"), ("partners", "Partners"), ("taxes", "Taxes")],

This comment has been minimized.

Copy link
@aritzolea

aritzolea Jan 2, 2025

Contributor

Y que parte del código hace que aplique los filtros si el valor grouped_by no tenía ningún valor?

This comment has been minimized.

Copy link
@sergiobstoj

sergiobstoj Jan 2, 2025

Author Member

No había relación entre la aplicación de los Filtros de cuentas y el hecho de que no se desplegará toda la información.

El tema era que al tener grouped_by = "", se entiende como False. Y en varías condicionales en métodos donde se procesan los datos no estaban siendo procesadas por tener un if grouped_by.

Por ejemplo

if grouped_by and not gen_led_data[acc_id][grouped_by]:

This comment has been minimized.

Copy link
@aritzolea

aritzolea Jan 2, 2025

Contributor

Entendido, gracias

selection=[("none", "None"), ("partners", "Partners"), ("taxes", "Taxes")],
default="partners",
required=True,
)
show_cost_center = fields.Boolean(
string="Show Analytic Account",
Expand Down

0 comments on commit 3d00541

Please sign in to comment.