Files
stock-rma/rma_repair/models/repair.py
Lois Rilo 27836c09f8 [FIX] rma_repair: under_warranty cannot be editable as it is only
editable in draft state in the related RMA, therefore when you
have created a repair order, the field `under_warranty` is not
editable anymore.
2025-01-07 12:35:35 +05:30

19 lines
519 B
Python

# Copyright 2020-21 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class RepairOrder(models.Model):
_inherit = "repair.order"
rma_line_id = fields.Many2one(
comodel_name="rma.order.line", string="RMA", ondelete="restrict"
)
under_warranty = fields.Boolean(
related="rma_line_id.under_warranty",
)
payment_state = fields.Selection(
related="invoice_id.payment_state", string="Payment Status"
)