-
-
Notifications
You must be signed in to change notification settings - Fork 225
[18.0][ADD] rma_batch_sale_auto_detect #501
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
base: 18.0
Are you sure you want to change the base?
Conversation
f78d7a7 to
d9ba3fb
Compare
| from odoo.addons.rma_sale_auto_detect.tests.common import TestRmaSaleAutoDetectBase | ||
|
|
||
|
|
||
| class TestRmaBatchSaleAutoDetect(TestRmaSaleAutoDetectBase): |
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.
Tests fail, I guess the class must be tagged as post-install
| def _create_rma(self, partner, product, qty, operation): | ||
| rma = super()._create_rma(partner, product, qty, operation) | ||
| rma.batch_id = self.batch |
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.
What happens if you create a RMA batch for partner 1 but you add RMAs for both partner 1 and partner 2 inside this batch?
I've seen there is a compute on partner_id on rma model, to fill it with the partner of the batch. But what if the link is done in the other way: setting the partner on the RMA first, then adding the RMA to the batch?
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 will add a constraint to prevent users from mixing rmas from different partners in the same batch
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.
done in #499
ada04d0 to
0331e1e
Compare
94fb844 to
c6808e3
Compare
This module extends the batch RMA process by adding automatic sale order linking at batch level. It reuses the matching logic provided by the module `rma_sale_auto_detect`, but allows it to be executed on all RMAs contained inside an `rma.batch`. A new batch state **Manual Treatment** is introduced. If at least one RMA in the batch fails to auto-match, the batch is moved to this state, so the user can review and fix the unmatched RMAs manually. refs: OCA#473 [IMP] rma_batch_sale_auto_detect: allow user to select product then so in batch view
c6808e3 to
641ae3c
Compare
This module extends the batch RMA process by adding automatic sale order linking at batch level. It reuses the matching logic provided by the module
rma_sale_auto_detect, but allows it to be executed on all RMAs contained inside anrma.batch.A new batch state Manual Treatment is introduced. If at least one RMA in the batch fails to auto-match, the batch is moved to this state, so the user can review and fix the unmatched RMAs manually.
refs: #473