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 Apr 15, 2024
1 parent 38d053f commit c971910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rma_sale_mrp/models/account_move.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2021 Tecnativa - David Vidal
# Copyright 2024 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.tools import float_compare
Expand All @@ -14,9 +15,10 @@ def _check_rma_invoice_lines_qty(self):
)
lines = super()._check_rma_invoice_lines_qty()
if lines:
return lines.sudo().filtered(
return lines.filtered(
lambda r: (
r.rma_id.phantom_bom_product
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
)
)
Expand Down
1 change: 1 addition & 0 deletions rma_sale_mrp/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* David Vidal
* Michael Tietz (MT Software) <[email protected]>

0 comments on commit c971910

Please sign in to comment.