diff --git a/addons/point_of_sale/models/pos_printer.py b/addons/point_of_sale/models/pos_printer.py index c9d6c182c5c..a923696d3f2 100644 --- a/addons/point_of_sale/models/pos_printer.py +++ b/addons/point_of_sale/models/pos_printer.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import fields, models, api, _ -from odoo.exceptions import ValidationError +from odoo import fields, models class PosPrinter(models.Model): @@ -14,9 +13,3 @@ class PosPrinter(models.Model): selection=[('iot', ' Use a printer connected to the IoT Box')]) proxy_ip = fields.Char('Proxy IP Address', help="The IP Address or hostname of the Printer's hardware proxy") product_categories_ids = fields.Many2many('pos.category', 'printer_category_rel', 'printer_id', 'category_id', string='Printed Product Categories') - - @api.constrains('proxy_ip') - def _constrains_proxy_ip(self): - for record in self: - if record.printer_type == 'iot' and not record.proxy_ip: - raise ValidationError(_("Proxy IP cannot be empty."))