-
-
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
[16.0][FIX] rma: same procurement group for reception and delivery #421
base: 16.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,15 +163,3 @@ def _prepare_refund_line_vals(self): | |
): | ||
vals["sale_line_ids"] = [(4, line.id)] | ||
return vals | ||
|
||
def _prepare_procurement_group_vals(self): | ||
vals = super()._prepare_procurement_group_vals() | ||
if not self.env.context.get("ignore_rma_sale_order") and self.order_id: | ||
vals["sale_id"] = self.order_id.id | ||
return vals | ||
|
||
def _prepare_delivery_procurements(self, scheduled_date=None, qty=None, uom=None): | ||
self = self.with_context(ignore_rma_sale_order=True) | ||
return super()._prepare_delivery_procurements( | ||
scheduled_date=scheduled_date, qty=qty, uom=uom | ||
) | ||
Comment on lines
-166
to
-177
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not aware of the history behind this code, but I believe it was implemented this way to avoid linking the rma delivery pickings to the sales order, as in recent versions, this linkage creates a sales line if the procurement group is associated to a sale order without an existing line. This approach has led to:
I propose to completely cut the link between the RMA procurement group and the sales order, maintaining a single procurement group for all RMA pickings. In #417, I am working on a different approach to establish this link between the RMA stock moves and the sales line, allowing standard refunding to be configurable based on the operation. |
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.
But if some rma in the group don't have a procurement group, then you don't give them one anymore. I don't think you need to change the test