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

[14.0][MIG] account_analytic_no_lines #422

Merged
merged 36 commits into from
Aug 16, 2023

Conversation

alexis-via
Copy link
Contributor

No description provided.

ThomasBinsfeld and others added 30 commits December 22, 2021 14:07
[ADD] account_analytic_no_lines
Hide analytic lines in account move line form view
Add group by on analytic accounts on account move lines
The test did not use analytic accounts so it did not
actually reveal the bug.
Keep the xmlid for compatibility, add a todo.
Also, move the security group definition to the security directory.
Add hook to determine if analytic lines must be created or not.
The default provided hook tests if the line is about a expensable
product that must be invoiced to the customer, in which case the
analytic line must be generated so it is added to the sale order.
Currently translated at 100,0% (10 of 10 strings)

Translation: account-analytic-10.0/account-analytic-10.0-account_analytic_no_lines
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-account_analytic_no_lines/de/
Currently translated at 100,0% (10 of 10 strings)

Translation: account-analytic-10.0/account-analytic-10.0-account_analytic_no_lines
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-account_analytic_no_lines/ca/
bosd and others added 3 commits December 22, 2021 14:07
Currently translated at 20.0% (2 of 10 strings)

Translation: account-analytic-10.0/account-analytic-10.0-account_analytic_no_lines
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-account_analytic_no_lines/nl/
Migration from v10 to v14

@api.model
def _must_create_analytic_line(self, move_line):
if not move_line.product_id:
Copy link
Member

Choose a reason for hiding this comment

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

The same comments apply from #357

Expense_policy is defined on sale, so it should be False always, if you need that, that should go to another module. Isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, that would go to another module I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course, we could have yet-another glue module... but we have quite a lot already. That's why "hasattr" is used ; that way, it works both when sale is installed and when sale isn't installed, without having to maintain a separate module. The idea is to generate the analytic line in DB ONLY when we really need it, i.e. when we have a product with an expense policy.

@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 Jul 17, 2022
@alexis-via alexis-via removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 18, 2022
@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 Dec 11, 2022
@github-actions github-actions bot closed this Jan 15, 2023
@rousseldenis
Copy link
Contributor

@alexis-via Is this still applicable ? If yes, reopen it ? @rafaelbn

@rousseldenis
Copy link
Contributor

I'll do 16.0 migration

@rafaelbn
Copy link
Member

Applicable for all that need this! 😄

@rafaelbn rafaelbn reopened this Jul 19, 2023
@rafaelbn
Copy link
Member

@AaronHForgeFlow @etobella @alexis-via @rousseldenis last review and try to merge it?

@rafaelbn
Copy link
Member

/ocabot migration account_analytic_no_lines

@OCA-git-bot OCA-git-bot added this to the 14.0 milestone Jul 19, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 19, 2023
19 tasks
@rafaelbn rafaelbn added needs review and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Jul 19, 2023
Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review

@alexis-via
Copy link
Contributor Author

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-422-by-alexis-via-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8df5f25 into OCA:14.0 Aug 16, 2023
@OCA-git-bot
Copy link
Contributor

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

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.