Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] Custom fields in accounting expressions (e.g. fldp.quantity, fld.carbon_balance) #584

Merged
merged 8 commits into from
Dec 11, 2024

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Nov 15, 2023

This is a very rough experiment on the Accounting Expression Processor to support expressions such as fldp.quantity[60%]

This will read the quantity field in the same read_group as debit and credit so we can write efficient expressions on any numerical field that is available in the move-line-like table.

TODO

  • add tests
  • fix failing tests
  • update legend
  • update docs

@sbidoul sbidoul added the 16.0 label Nov 15, 2023
@sbidoul sbidoul force-pushed the 16.0-custom-fld branch 3 times, most recently from 659cd36 to 04328ad Compare November 15, 2023 18:56
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 Mar 17, 2024
@sbidoul sbidoul removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 17, 2024
@sbidoul sbidoul changed the title Custom fields in accounting expressions [16.0] Custom fields in accounting expressions May 10, 2024
Copy link

github-actions bot commented Sep 8, 2024

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 Sep 8, 2024
@github-actions github-actions bot closed this Oct 13, 2024
@sbidoul sbidoul removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 13, 2024
@sbidoul sbidoul reopened this Oct 13, 2024
@sbidoul sbidoul added the no stale Use this label to prevent the automated stale action from closing this PR/Issue. label Oct 13, 2024
@sbidoul sbidoul marked this pull request as ready for review November 11, 2024 11:36
Now that there is a default value for the debit/credit
in the accumulator, we can simplify.
and prepare for custom fields
@sbidoul
Copy link
Member Author

sbidoul commented Nov 11, 2024

This is ready to go. I added tests and documentation.

Very useful to combine quantities (say, hours) with accounting data in the same MIS report.

@sbidoul sbidoul changed the title [16.0] Custom fields in accounting expressions [16.0] Custom fields in accounting expressions (e.g. fldp.quantity) Nov 11, 2024
@sbidoul sbidoul changed the title [16.0] Custom fields in accounting expressions (e.g. fldp.quantity) [16.0] Custom fields in accounting expressions (e.g. fldp.quantity, fld.carbon_balance) Dec 8, 2024
@sbidoul
Copy link
Member Author

sbidoul commented Dec 11, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-584-by-sbidoul-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2a2ac46 into OCA:16.0 Dec 11, 2024
5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fa23751. Thanks a lot for contributing to OCA. ❤️

@sbidoul sbidoul deleted the 16.0-custom-fld branch December 11, 2024 13:11
@victoralmau
Copy link
Member

I see that the changes added here have lost an interesting functionality (which existed in v16 and exists in v15).
Before, in comparison mode (2023 vs 2024 for example) accounts with no data will not be shown, now they are all shown (even if they have no data in any of the periods). It seems to be related to edaee9b#diff-c78e2ca554b9359f0e967b6ab457d608b0030631f2b73e2e31f5942457cb11c0R401 but I am not clear about the proper fix, because there are other related changes, can you check it? Thanks.

@pedrobaeza
Copy link
Member

cc @sbidoul

@sbidoul
Copy link
Member Author

sbidoul commented Dec 18, 2024

Ah, sorry if this caused a regression. I'll have a look in the coming days. Could you create a separate issue and if possible a little more explanation as I'm not sure I fully understand the issue.

@victoralmau
Copy link
Member

Ah, sorry if this caused a regression. I'll have a look in the coming days. Could you create a separate issue and if possible a little more explanation as I'm not sure I fully understand the issue.

Of course, created and explained with a use case. #665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
16.0 merged 🎉 no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants