mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
Sometimes there's no choice to return, refund or replace an RMA for different reasons. For example, when the customer doesn't want to repair the product because that would be too expensive. We still want finish the RMA and document the reasons. This improvement allows it. TT34164
27 lines
681 B
Python
27 lines
681 B
Python
# Copyright 2022 Tecnativa - David Vidal
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
from odoo import fields, models
|
|
|
|
|
|
class RmaFinalization(models.Model):
|
|
_description = "RMA Finalization Reason"
|
|
_name = "rma.finalization"
|
|
_order = "name"
|
|
|
|
active = fields.Boolean(default=True)
|
|
name = fields.Char(
|
|
string="Reason Name",
|
|
required=True,
|
|
translate=True,
|
|
copy=False,
|
|
)
|
|
company_id = fields.Many2one(comodel_name="res.company")
|
|
|
|
_sql_constraints = [
|
|
(
|
|
"name_company_uniq",
|
|
"unique (name, company_id)",
|
|
"Finalization name already exists !",
|
|
),
|
|
]
|