mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX] rma_sale_mrp: _check_rma_invoice_lines_qty checks now only lines with phantom_bom_product set~
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# Copyright 2021 Tecnativa - David Vidal
|
# Copyright 2021 Tecnativa - David Vidal
|
||||||
|
# Copyright 2024 Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
from odoo import models
|
from odoo import models
|
||||||
from odoo.tools import float_compare
|
from odoo.tools import float_compare
|
||||||
@@ -16,7 +17,8 @@ class AccountMove(models.Model):
|
|||||||
if lines:
|
if lines:
|
||||||
return lines.sudo().filtered(
|
return lines.sudo().filtered(
|
||||||
lambda r: (
|
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
|
and float_compare(r.quantity, r.rma_id.kit_qty, precision) < 0
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
* `Tecnativa <https://www.tecnativa.com>`__:
|
* `Tecnativa <https://www.tecnativa.com>`__:
|
||||||
|
|
||||||
* David Vidal
|
* David Vidal
|
||||||
|
* Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||||
|
|||||||
Reference in New Issue
Block a user