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
[FIX] sale: correctly get AML lines with downpayment #77195
Conversation
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.
Seems correct, even if I don't really see the flow to reproduce the bug in standard 🤔
Steps: - Create AML which is linked to multiple Down payment SO lines - Post Invoice Issue: - Traeback due to accessing field on m2m `sale_line_ids` field Fix: - Filter the SO lines based on `is_downpayment` field. Fixes: odoo#77028
73a3633
to
d694d58
Compare
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.
Thanks @sswapnesh for solving,
There is another problem related to reference multiple sale lines to one invoice line, maybe should be solve in another PR, the field qty_invoiced in sale.order.line show the quantity of invoice line without consider, in this case, that the value is the sum of others sale lines https://github.com/odoo/odoo/blob/14.0/addons/sale/models/sale.py#L1230, what can make confuse the user about the real Invoiced Quantity:
@Feyensv Can this be merged ? |
After more thoughts, I prefer to avoid merging stable changes unless you can really reproduce this traceback with a standard flow (AFAIK, we never link one AML with multiple SOL in standard flows 🤔) |
@Feyensv What do you think to correct this on new versions to make this one to one ? |
There is no such thing as a Onetoone field :D. |
😄 It was there in Past 😉 |
Oh indeed, I thought it was already a m2o/o2m pair, but those are two m2m surprisingly. |
Dear @sswapnesh, Thank you for your contribution but the version 14.0 is no longer supported. We apology if we could not look at your request in time. This is an automated message. |
Steps:
Issue:
sale_line_ids
fieldFix:
is_downpayment
field.Fixes: Post Invoice with lines with mulltiple Sale lines #77028
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr