-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
[IMP] rma: configurable workflow #417
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @chienandalu, @pedrobaeza, |
6fcef2e
to
387d02c
Compare
rma/models/rma.py
Outdated
) | ||
|
||
# Replace fields, used when the delivery is created automatically | ||
replace_warehouse_id = fields.Many2one( |
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.
The computation of these fields will mean an overhead on existing installations. Why they are needed? This seems a new feature that is not linked with the configurable workflow.
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.
In the operation, if the user selects 'Automatic Delivery' and 'Different Return Product,' the workflow will trigger the replacement action. Since the replacement action requires user input, the replacement information should be filled in the RMA at the time of its creation.
The computed fields for the replacement warehouse and replacement product UoM are intended to provide default values. A migration script can be added to create these columns, ensuring that their computation does not trigger on existing RMAs.
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.
Please add the post_init_hook/migration script thus.
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
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.
@jbaudoux pointed out that replacing a product with a different one can be handled by processing an RMA reception with a refund and then creating a normal sale. I will remove this part I added to the workflow.
Another use case reported by the customer is receiving a different product than the one ordered. In this case, we need to receive a product that is not listed on the sale order and then redeliver the originally ordered product.
I am considering adding a new field, 'product to return,' which will be used if the operation has 'return a different product' set to True.
In this case, the reception will involve the different product. Otherwise, the standard behavior will apply, and the product_id will be used for both reception and delivery.
What are your thoughts on this?
387d02c
to
221d30d
Compare
38c8100
to
e912c52
Compare
02b9604
to
5261de6
Compare
5261de6
to
4f00835
Compare
4f00835
to
9737b31
Compare
ad6b471
to
a3d5c26
Compare
a3d5c26
to
0712bb6
Compare
As explained in #413, having a configurable RMA process helps cover more use cases by allowing the configuration of when the three main actions (reception, delivery, and refund) occur.
This PR adds configuration fields to the RMA operation, which allow managing the visibility of these actions in the RMA form. It also adds the possibility to automatically trigger these actions upon RMA confirmation or reception.
To minimize the impact on current users of this module, default values were set for these settings to maintain the existing workflow unchanged. After making these changes, there was no need to adjust the existing unit tests.
fixes: #413
cc/ @pedrobaeza , @jbaudoux , @lmignon , @rousseldenis