-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
[14.0][MIG] account_analytic_no_lines #422
Conversation
[ADD] account_analytic_no_lines
Hide analytic lines in account move line form view Add group by on analytic accounts on account move lines
…== 0 and a payment term
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/
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: |
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 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?
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.
I agree, that would go to another module I think.
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.
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.
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. |
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. |
@alexis-via Is this still applicable ? If yes, reopen it ? @rafaelbn |
I'll do 16.0 migration |
Applicable for all that need this! 😄 |
@AaronHForgeFlow @etobella @alexis-via @rousseldenis last review and try to merge it? |
/ocabot migration account_analytic_no_lines |
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.
Code review
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at f82f279. Thanks a lot for contributing to OCA. ❤️ |
No description provided.