Files
stock-rma/rma_scrap/models/rma_operation.py
AaronHForgeFlow 3c5f311f84 [FIX] rma_scrap: minor lint error
[FIX] rma_scrap: ensure scrapping serials will scrap just 1 unit & ensure scrapped quantity is always positve
[FIX] rma_scrap: scrap quantity should consider the quantity in the stock moves not the product_uom_qty
[IMP] rma_scrap: test serial case
2024-11-29 09:05:06 +05:30

25 lines
688 B
Python

# Copyright 2022 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.html).
from odoo import fields, models
class RmaOperation(models.Model):
_inherit = "rma.operation"
scrap_policy = fields.Selection(
selection=[
("no", "Not required"),
("ordered", "Based on Ordered Quantities"),
("received", "Based on Received Quantities"),
],
default="no",
)
scrap_location_id = fields.Many2one(
comodel_name="stock.location",
string="Scrap Destination Location",
domain="[('scrap_location', '=', True),"
"('company_id', 'in', [company_id, False])]",
)