-
-
Notifications
You must be signed in to change notification settings - Fork 617
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][FIX] account_financial_report: Remove inactive analytic account relations #1237
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] account_financial_report: Remove inactive analytic account relations #1237
Conversation
6d45a8b
to
f7d69e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current behavior is correct, as you have to see the historical data of that account, no matter if currently the analytic account is archived. It's the same as if you archive a partner.
Hi @pedrobaeza But if we attempt to remove from a Journal Item the archived Analytic Account, shouldn't it be unlinked? That's the only case being considered here. If we don't remove an archived Analytic Account, the relation still remains. two-archived-accounts.webm |
Why don't you put |
503c6bc
to
f6053f7
Compare
|
Yeah, but I'm afraid this is not valid either. As said, an archived analytic account must still be shown in financial reports. |
I agree with Pedro on this topic. |
f6053f7
to
784c2ad
Compare
When an analytic account is set to inactive (active=False), the relation with Journal Item is not automatically removed. This causes inactive analytic accounts to still appear linked to journal items when grouping by Analytic Account.
Current behavior before PR
analytic_account_ids
is updated.test_with_active_account.webm
account.move.line
records.test_with_inactive_account.webm
Behavior with PR
test_with_pr.webm
Changes
self.analytic_account_ids = False
self.with_context(active_test=False).analytic_account_ids = [(6, 0, [])]
to consider archived analytic account.