-
-
Notifications
You must be signed in to change notification settings - Fork 166
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][MIG] account_invoice_margin: Migration to v16 #163
[16.0][MIG] account_invoice_margin: Migration to v16 #163
Conversation
Hi. could you take a look on CI ? |
Hi, yes, i am resolving the issues. |
66009af
to
1da762b
Compare
Hi, can anyone review this PR? Thanks in advance |
You may find reviewers by chance if someone is interested, but a non selfish way of collaborating is to review other PRs, and ask in exchange that they review yours. When you are a good contributor, there will be other good contributors that will be will to make the reviews for free, but you have to equal the balance. Anyway, if it's ready, remove the |
Totally agree with you, i'll see what i can do to improve that :) |
Pre-commit is still red. Could you take a look ? |
9d1ac7b
to
f6d4953
Compare
Fixed, is it possible to re-run the tests with Odoo? |
if you rebase, it will rerun the CI. |
Yes, but it is already up to date. |
f6d4953
to
83ac83d
Compare
Fixed one of the README images name. |
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.
Hi.
since OCA introduced _get_margin_applicable_lines features, margin can be computed correctly removing non relevant invoice lines. (down payment lines for example)
however, the sale_margin odoo module does'nt implement such feature and so the margin in sale.order can be wrong. (same for margin in pos.order) do you face the same issue ?
If yes do you have an idea how to fix it ?
thanks !
margin = 0.0 | ||
margin_signed = 0.0 | ||
price_subtotal = 0.0 | ||
for line in invoice._get_margin_applicable_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.
for line in invoice._get_margin_applicable_lines(): | |
for line in invoice.line_ids.filtered(lambda x: x.is_margin_applicable): |
What about to have a compute field on account.invoice.line. I think that it's a caracteristic of the line.
Just a proposal, not a blocking point.
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'll take a look, thank you @legalsylvain for pointing it out.
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.
Well, in fact, the ideal should be to have a uniq function _is_applicable_margin / _get_margin_applicable_lines or whatever that could be called in the account.move margin module / sale.order margin module / pos.order margin module.
But I'm not sure how to proceed.
ping @sergio-teruel and @pedrobaeza TT42417 |
/ocabot migration account_invoice_margin |
Hi. To the comment that posted @legalsylvain I would comment: This module is designed to calculate the margin in invoices and although in sale orders the margin could not be correct, we have that:
Based on that, I consider that any fixes on sale order margins would be great but I doubt this module is the one for them. Having said that, the module LGTM Thanks |
Runbot not available to test, please @ljsalvatierra-factorlibre could you make a rebase or add an empty commit trying to wake up runboat? 😄 |
[UPD] README.rst [UPD] Update account_invoice_margin.pot Translated using Weblate (Spanish) Currently translated at 100.0% (7 of 7 strings) Translation: margin-analysis-11.0/margin-analysis-11.0-account_invoice_margin Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-11-0/margin-analysis-11-0-account_invoice_margin/es/
[UPD] README.rst
…t invoice margin security group set
The invoice may be done in a currency different from the company currency, so the cost (purchase_price) amount will be incorrect in such context. TT38500
83ac83d
to
b241bed
Compare
Done, thank you for the reminder! :) |
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.
Functional revision OK
1b725e2
to
820a3ae
Compare
820a3ae
to
82a1784
Compare
This PR has the |
Is it possible to merge this PR? @OCA/accounting-maintainers |
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at e1f7b4d. Thanks a lot for contributing to OCA. ❤️ |
ping @Juangomezzurita |
#142