-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
[MIG] project_purchase_link: Migration to 16. #1061
Conversation
/ocabot migration project_purchase_link |
Sorry @AnizR you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
/ocabot migration project_purchase_link |
e1bd026
to
102a340
Compare
@@ -23,84 +21,205 @@ class ProjectProject(models.Model): | |||
) | |||
|
|||
def _compute_purchase_info(self): | |||
# read group | |||
query = self.env["purchase.order.line"]._search( |
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.
Why removing the read_group
? I don't think the complexity of the code deserves the few juice on the performance (if any).
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.
In fact, since now on a PO line we have an analytic_distribution (and an analytic distribution is a json such as:
{analytic_account_id1:rate1, analytic_account_id2:rate2...}).
I think that it is not possible to use a read group as it was done in previous versions because I am trying to find PO lines that have the analytic account of the project within their analytic distribution:
query.add_where( "purchase_order_line.analytic_distribution ?| array[%s]", [str(project.analytic_account_id.id) for project in self], )
But correct me if I am wrong
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.
OK, I see... Everything gets complicated with the new analytic system. I let users of this module to judge, as I don't use it and only doing some administrative collaboration.
102a340
to
40b7c1a
Compare
b14cf03
to
14c0eec
Compare
14c0eec
to
be6fe51
Compare
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. |
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: project-13.0/project-13.0-project_purchase_link Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_purchase_link/
[FIX] Test account.move type field [IMP] Tests [FIX] Tests [FIX] Tests [FIX] Tests [FIX] format
be6fe51
to
aa3831d
Compare
@pedrobaeza Do you have super-power to merge this please? |
There's a missing review, but well, I think it's enough with the arguments given and your review: /ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 09c3ded. Thanks a lot for contributing to OCA. ❤️ |
Migration of module project_purchase_link
Some modifications had to be done due to the fact that we now have analytic_distribution instead of just an anlaytic_account.