From e9b73a97c022c7456d4b98ed44d74231ab4c8168 Mon Sep 17 00:00:00 2001 From: FrankC013 Date: Tue, 13 Feb 2024 15:09:51 +0100 Subject: [PATCH] [REM] barcodes_gs1_label_expiry: remove gs1_generated field --- barcodes_gs1_label_expiry/__init__.py | 1 - barcodes_gs1_label_expiry/__manifest__.py | 1 - barcodes_gs1_label_expiry/models/__init__.py | 1 - .../models/stock_production_lot.py | 22 ------------------- .../views/stock_production_lot_views.xml | 21 ------------------ 5 files changed, 46 deletions(-) delete mode 100644 barcodes_gs1_label_expiry/models/__init__.py delete mode 100644 barcodes_gs1_label_expiry/models/stock_production_lot.py delete mode 100644 barcodes_gs1_label_expiry/views/stock_production_lot_views.xml diff --git a/barcodes_gs1_label_expiry/__init__.py b/barcodes_gs1_label_expiry/__init__.py index 1334cb405..01ff4df13 100644 --- a/barcodes_gs1_label_expiry/__init__.py +++ b/barcodes_gs1_label_expiry/__init__.py @@ -1,4 +1,3 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from . import models from . import report diff --git a/barcodes_gs1_label_expiry/__manifest__.py b/barcodes_gs1_label_expiry/__manifest__.py index 8ff4bba1c..31ed42f3b 100644 --- a/barcodes_gs1_label_expiry/__manifest__.py +++ b/barcodes_gs1_label_expiry/__manifest__.py @@ -13,7 +13,6 @@ "author": "NuoBiT Solutions, S.L., Eric Antones", "website": "https://github.com/nuobit/odoo-addons", "depends": ["barcodes_gs1_label", "product_expiry"], - "data": ["views/stock_production_lot_views.xml"], "installable": True, "development_status": "Beta", "maintainers": ["eantones", "fcespedes"], diff --git a/barcodes_gs1_label_expiry/models/__init__.py b/barcodes_gs1_label_expiry/models/__init__.py deleted file mode 100644 index dd885b7be..000000000 --- a/barcodes_gs1_label_expiry/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import stock_production_lot diff --git a/barcodes_gs1_label_expiry/models/stock_production_lot.py b/barcodes_gs1_label_expiry/models/stock_production_lot.py deleted file mode 100644 index 0abdefcd2..000000000 --- a/barcodes_gs1_label_expiry/models/stock_production_lot.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright NuoBiT Solutions, S.L. () -# Eric Antones -# Frank Cespedes -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) - -from odoo import _, api, models -from odoo.exceptions import ValidationError - - -class ProductionLot(models.Model): - _inherit = "stock.production.lot" - - @api.constrains("removal_date") - def _check_name(self): - for rec in self: - if rec.gs1_generated: - raise ValidationError( - _( - "If the lot has a GS1 generated," - " the removal date cannot be modified" - ) - ) diff --git a/barcodes_gs1_label_expiry/views/stock_production_lot_views.xml b/barcodes_gs1_label_expiry/views/stock_production_lot_views.xml deleted file mode 100644 index b3c28fc7d..000000000 --- a/barcodes_gs1_label_expiry/views/stock_production_lot_views.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - production_lot_form_view.inherit.barcodes_gs1_label_expiry - stock.production.lot - - - - {'readonly': [('gs1_generated', '=', True)]} - - - -