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

[14.0][FIX] rma_sale_mrp: _check_rma_invoice_lines_qty #351

Merged

Conversation

mt-software-de
Copy link
Contributor

@mt-software-de mt-software-de commented May 22, 2023

checks now only lines with a phantom_bom_product set

If we are trying to post a refund for rma without kit and a lower qty than defined in the rma.
There will no error thrown, as designed here

def action_post(self):

@OCA-git-bot
Copy link
Contributor

Hi @chienandalu,
some modules you are maintaining are being modified, check this out!

@mt-software-de
Copy link
Contributor Author

@pedrobaeza and @chienandalu could you please do the review.

@pedrobaeza pedrobaeza changed the title [FIX] rma_sale_mrp: _check_rma_invoice_lines_qty [14.0][FIX] rma_sale_mrp: _check_rma_invoice_lines_qty May 22, 2023
@pedrobaeza pedrobaeza added this to the 14.0 milestone May 22, 2023
@pedrobaeza
Copy link
Member

Can you please add steps to reproduce the problem?

Also a regression test would be welcome.

@mt-software-de
Copy link
Contributor Author

Can you please add steps to reproduce the problem?

Also a regression test would be welcome.

You can reproduce the problem if you install rma_sale_mrp with demo data and the run the tests of the base rma module

@pedrobaeza
Copy link
Member

Tests are not re-entrant by default. We have this module installed, and our users do both type of RMA without problem, so I insist in a reproducible steps to reproduce the problem.

@mt-software-de
Copy link
Contributor Author

mt-software-de commented May 22, 2023

Tests are not re-entrant by default. We have this module installed, and our users do both type of RMA without problem, so I insist in a reproducible steps to reproduce the problem.

Ok then you can reproduce the error like this.
If you have rma_sale_mrp installed
create a rma with a qty > 1 for product which is not a kit product
Then do the incoming picking and after that create the refund
on the refund change the qty to a lower qty than it is set on the rma.
And then post the refund by calling action_post.
This should thrown an error because of this design

def action_post(self):

But the error will not be thrown.

@pedrobaeza
Copy link
Member

@chienandalu do you understand the problem? I don't.

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Yes, I think is ok @pedrobaeza

@mt-software-de thanks for the fix :)

A comment on the method override design:

rma_sale_mrp/models/account_move.py Show resolved Hide resolved
@mt-software-de mt-software-de force-pushed the 14.0-fix-rma_sale_mrp-move-action-post branch 2 times, most recently from 352ea55 to e77e3c4 Compare May 23, 2023 11:58
Copy link

github-actions bot commented Nov 5, 2023

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 5, 2023
@mt-software-de mt-software-de force-pushed the 14.0-fix-rma_sale_mrp-move-action-post branch from e77e3c4 to c73a371 Compare November 7, 2023 16:43
@mt-software-de
Copy link
Contributor Author

@chienandalu can you update your review and remove the stale label?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 12, 2023
rma_sale_mrp/models/account_move.py Outdated Show resolved Hide resolved
@mt-software-de mt-software-de force-pushed the 14.0-fix-rma_sale_mrp-move-action-post branch from c73a371 to c971910 Compare April 15, 2024 21:43
@mt-software-de mt-software-de force-pushed the 14.0-fix-rma_sale_mrp-move-action-post branch from c971910 to c2eb231 Compare April 15, 2024 21:45
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

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-351-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5ca0026 into OCA:14.0 Apr 22, 2024
5 checks passed
@OCA-git-bot
Copy link
Contributor

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

6 participants