-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] rma_sale_mrp: _check_rma_invoice_lines_qty checks now only line…
…s with phantom_bom_product set~
- Loading branch information
1 parent
38d053f
commit c971910
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> |