From 4d9226572675f538f3e77cdf223d6e881ba1b39d Mon Sep 17 00:00:00 2001 From: ahenriquez Date: Tue, 29 Oct 2019 16:53:47 +0100 Subject: [PATCH] [FIX]UsreError to Validation Error --- rma/README.rst | 1 + rma/models/rma_order.py | 3 +-- rma/models/rma_order_line.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rma/README.rst b/rma/README.rst index dfe6657a..e5d2e159 100644 --- a/rma/README.rst +++ b/rma/README.rst @@ -94,6 +94,7 @@ Known issues and Roadmap * Dropshipping always counted as a delivery on the smart buttons. * Uninstall hook. * Constraints instead of required fields on rma.order.line. +* Rename type field on rma.order and rma.order.line Bug Tracker =========== diff --git a/rma/models/rma_order.py b/rma/models/rma_order.py index 59fd7343..a43a9e75 100644 --- a/rma/models/rma_order.py +++ b/rma/models/rma_order.py @@ -1,8 +1,7 @@ # Copyright (C) 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) -from odoo import api, fields, models, _ -from odoo.exceptions import UserError +from odoo import api, fields, models from datetime import datetime diff --git a/rma/models/rma_order_line.py b/rma/models/rma_order_line.py index 05a358cf..33bcb493 100644 --- a/rma/models/rma_order_line.py +++ b/rma/models/rma_order_line.py @@ -626,5 +626,5 @@ class RmaOrderLine(models.Model): @api.constrains("partner_id", "rma_id") def _check_partner_id(self): if self.rma_id and self.partner_id != self.rma_id.partner_id: - raise UserError(_( + raise ValidationError(_( "Group partner and RMA's partner must be the same."))