Skip to content

Conversation

@victoralmau
Copy link
Member

Define the appropriate value if not budgetable

Example use case:

  • Uncheck in the KPI of a template (Other for example) the Budgetable option.
  • Preview the MIS report.
  • The data in this column must be empty.
  • The data in the sum column (if any) must be appropriate.

Before
antes

After
despues

@Tecnativa TT56278

…ble.

Example use case:
- Uncheck in the KPI of a template (Other for example) the Budgetable option.
- Preview the MIS report.
- The data in this column must be empty.
- The data in the sum column (if any) must be appropriate.

TT56278
@OCA-git-bot
Copy link
Contributor

Hi @sbidoul,
some modules you are maintaining are being modified, check this out!

@sbidoul
Copy link
Member

sbidoul commented May 16, 2025

Note this behaviour is by design. Non budgetable KPIs are for KPIs that are computed from other KPIs (sums etc).

@pedrobaeza
Copy link
Member

Isn't a bit weird to have that ERR expressions if you haven't marked everything as budgetable? Can that check be computable somehow for avoiding this error? Or to silent that errors?

@sbidoul
Copy link
Member

sbidoul commented May 17, 2025

The errors show that such KPI should be budgetable as they are not computed from other KPIs.

What's the problem with marking them budgetable?

@juancarlosonate-tecnativa

It's not that there's a problem, it's just illogical. Why do i have to mark all the KPIs as budgetable if we only want to budget one of them? Logically, for the non-budgetable KPIs, the column you're assigning as the budget source should either show no data or a zero. Otherwise, for example, column totals could be incorrect.

@sbidoul
Copy link
Member

sbidoul commented May 19, 2025

Logically, for the non-budgetable KPIs, the column you're assigning as the budget source should either show no data or a zero.

The current logic is that a non budgetable kpi is computed from other budgetable kpis. To give an example, if you have two budgetable KPIs revenue and cost and a third one that is not budgetable named profit = revenue - cost, we expect the budgeted profit to be computed. So showing an empty value for non budgetable kpis won't do what we expect.

@juancarlosonate-tecnativa
Copy link

juancarlosonate-tecnativa commented May 19, 2025

The current logic is that a non budgetable kpi is computed from other budgetable kpis.

I'm sorry, but i don't understand this it doesn't make sense to me, especially if the logic of the mis_builder itself is that all kpis are non-budgetable.

@telenieko
Copy link

Hi all,

Barging in here (we are users of this module).

If I am understanding correctly, what @sbidoul is saying is that non-budgetable does not exactly mean (1) "the user cannot budget this" but more (2) "this cannot be budgeted because it is a computed value" (ie, has an expression).

That would mean that those KPIs would in fact be budgetable, it just happens that the budget is computed not manually entered, but a budget it is. One may expect non-budgetable to mean that no matter what, that KPI will be blank on the reports.

Is that so? In such a case, there would be no way to inform what can be or cannot be budgeted by the user (meaning 1) while meaning 2 is redundant (if there's an expression/computation it is implicit the non-budgetable status).

It is my understanding that at this moment I would have to mark as budgetable: what the user can budget (1) and any computed dependencies of that KPI (2).

@sbidoul
Copy link
Member

sbidoul commented May 21, 2025

Is that so? In such a case, there would be no way to inform what can be or cannot be budgeted by the user (meaning 1) while meaning 2 is redundant (if there's an expression/computation it is implicit the non-budgetable status).

More or less. There is indeed no way to inform that a KPI cannot/should not be budgeted by the user if that KPI contains an accounting expression such as bal[...].

So currently, all KPIs that have accounting expressions or expressions on Queries must be marked budgetable (or else an error will be displayed), and KPIs that are expressions depending on other KPIs should not be marked budgetable so they can be computed from other budgeted values and avoid redundant entries in the budget.

@juancarlosonate-tecnativa
Copy link

juancarlosonate-tecnativa commented May 28, 2025

More or less. There is indeed no way to inform that a KPI cannot/should not be budgeted by the user if that KPI contains an accounting expression such as bal[...].

Well, i still stand by my opinion that this behavior is counterintuitive, from the moment all KPIs are considered non-budgetable by default module, the use of the budgetable boolean becomes confusing and counterintuitive for most users.

In my opinion the expected behavior should be to display 0 or no data in the budget source column in case the KPI is not budgetable.

@sbidoul
Copy link
Member

sbidoul commented May 28, 2025

this behavior is counterintuitive

I can agree with that.

But unless a more complete solution is proposed, I would suggest improving the documentation.

Displaying 0 or no data is not acceptable for the reasons I explained above.

@pedrobaeza
Copy link
Member

What about detecting expressions with one of the reserved words (bal, balp,etc), and discard that expressions automatically in the budget column?

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 12, 2025
@pedrobaeza
Copy link
Member

@sbidoul please check my previous comment #680 (comment)

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants