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][ADD] account_analytic_category (replace account.analytic.group) #630

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

norlinhenrik
Copy link

@norlinhenrik norlinhenrik commented Feb 25, 2024

2 new modules with 2 new fields on account.move.line to use in pivot:

  • account_move_line_analytic_account_ids: new field analytic_account_ids.
  • account_analytic_category: new field analytic_category_ids.

@norlinhenrik norlinhenrik force-pushed the 16.0-add-account_analytic_category branch 6 times, most recently from 36d2609 to 56df5b1 Compare February 26, 2024 14:19
Comment on lines +1 to +2
This module introduces account.analytic.category
as a replacement for account.analytic.group which was removed in Odoo 16.0.
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to rename the model?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo called the model for Analytic Categories and I thought maybe this is a better name. But I am flexible on this.

"category": "Account",
"website": "https://github.com/OCA/account-analytic",
"depends": [
"account_financial_report", # account.move.line.analytic_account_ids
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this dependency was a bit heavy. Maybe the part that depends on account.move.line.analytic_account_ids can be handled in a separate glue module in the account-financial-reporting repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a new module account_move_line_analytic_account_ids.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also this PR #565 but the proposed solution in this PR doesn't store analytic_account_ids due to a technical reason.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :) I have added analytic_mixin_analytic_account as a dependeny.

@norlinhenrik norlinhenrik force-pushed the 16.0-add-account_analytic_category branch 8 times, most recently from 889f799 to 6c9651a Compare February 28, 2024 19:44
@norlinhenrik norlinhenrik force-pushed the 16.0-add-account_analytic_category branch 2 times, most recently from 1736718 to 04ca2fb Compare May 29, 2024 15:06
@norlinhenrik norlinhenrik force-pushed the 16.0-add-account_analytic_category branch from 04ca2fb to bec164d Compare May 29, 2024 15:21
@norlinhenrik
Copy link
Author

Waiting to merge analytic_mixin_analytic_account, see #565.

@norlinhenrik
Copy link
Author

norlinhenrik commented Jul 17, 2024

Maybe a better implementation would be to create an analytic_category_distribution JSON field on the account.move.line?

EDIT
Two observations in 16.0:

  • account.analytic.plan has parent_id. Having one parent for all plans improves the UI.
  • account.move.line has analytic_account_id. In pivot view, I can group by Analytic Account.

account.move.line with analytic_plan_id is really what I am missing. I would like to group by Analytic Plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants