Skip to content

Commit

Permalink
[FIX] rma_sale: sale_id not assigned to procurement_group when creati…
Browse files Browse the repository at this point in the history
…ng from stock.picking return wizard
  • Loading branch information
c.mano committed Aug 2, 2024
1 parent 9787b8a commit d85e072
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rma_sale/wizard/stock_picking_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def _prepare_rma_vals(self):
vals = super()._prepare_rma_vals()

Check warning on line 21 in rma_sale/wizard/stock_picking_return.py

View check run for this annotation

Codecov / codecov/patch

rma_sale/wizard/stock_picking_return.py#L21

Added line #L21 was not covered by tests
sale_order = self.picking_id.sale_id
if sale_order:
group_id = vals.get("procurement_group_id")

Check warning on line 24 in rma_sale/wizard/stock_picking_return.py

View check run for this annotation

Codecov / codecov/patch

rma_sale/wizard/stock_picking_return.py#L24

Added line #L24 was not covered by tests
if group_id:
group = self.env["procurement.group"].browse(group_id)
group.sale_id = sale_order

Check warning on line 27 in rma_sale/wizard/stock_picking_return.py

View check run for this annotation

Codecov / codecov/patch

rma_sale/wizard/stock_picking_return.py#L26-L27

Added lines #L26 - L27 were not covered by tests
vals.update(
{
"order_id": sale_order.id,
Expand Down

0 comments on commit d85e072

Please sign in to comment.