Skip to content

Commit

Permalink
[FIX] rma_sale_mrp: _check_rma_invoice_lines_qty checks now only line…
Browse files Browse the repository at this point in the history
…s with phantom_bom_product set~
  • Loading branch information
mt-software-de committed Nov 7, 2023
1 parent a5d476f commit c73a371
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions rma_sale_mrp/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ def _check_rma_invoice_lines_qty(self):
"Product Unit of Measure"
)
lines = super()._check_rma_invoice_lines_qty()
if lines:
return lines.sudo().filtered(
lambda r: (
r.rma_id.phantom_bom_product
and float_compare(r.quantity, r.rma_id.kit_qty, precision) < 0
)
if not lines:
return lines
return lines.filtered(
lambda r: (
not r.rma_id.phantom_bom_product
or r.rma_id.phantom_bom_product
and float_compare(r.quantity, r.rma_id.kit_qty, precision) < 0
)
return lines
)

0 comments on commit c73a371

Please sign in to comment.