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

[15.0][FIX] account_invoice_report_grouped_by_picking: Method abs is called when remaining_qty is near of zero #337

Conversation

carlosdauden
Copy link
Contributor

@Tecnativa TT51353

@carlosdauden
Copy link
Contributor Author

carlosdauden commented Oct 17, 2024

ping @sergio-teruel @chienandalu

FWPort after merge

@carlosdauden carlosdauden force-pushed the 15.0-FIX-account_invoice_report_grouped_by_picking-round_remaining_qty branch 2 times, most recently from 4cfd538 to 2d54c82 Compare October 18, 2024 06:26
@pedrobaeza pedrobaeza added this to the 15.0 milestone Oct 18, 2024
@@ -101,45 +91,51 @@ def lines_grouped_by_picking(self):
}
)
continue

Copy link
Member

Choose a reason for hiding this comment

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

Please don't add empty lines inside a method, for both continuing with the existing style and as PEP8 recommendation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes done, but PEP8 allow blank lines in this cases:

Extra blank lines may be used (sparingly) to separate groups of related functions. Blank lines may be omitted between a bunch of related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical sections.

https://peps.python.org/pep-0008/#blank-lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main problem is that this method is too long and smaller methods should be created.
I discarded that change because all these methods are being declared in the account.move model.
The ultimate solution is to bring all this logic into an abstract_report, but I didn't want to do that in a stable release.
Let's keep that in mind for the migration to the new version.

…plify and remove OrderedDict

From Python 3.7 dictionaries maintain the insertion order, so OrderedDict is unnecessary and adds overhead.
@carlosdauden carlosdauden force-pushed the 15.0-FIX-account_invoice_report_grouped_by_picking-round_remaining_qty branch from 2d54c82 to 04b4d84 Compare October 18, 2024 08:01
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-337-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2f2ee9b into OCA:15.0 Oct 18, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4d6a89c. 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.

5 participants