diff --git a/modules/stock_lot/CHANGELOG b/modules/stock_lot/CHANGELOG index 6252dc26ca..88f77c47f7 100644 --- a/modules/stock_lot/CHANGELOG +++ b/modules/stock_lot/CHANGELOG @@ -1,3 +1,4 @@ +* Allow stock lot to be deactivated * Do not copy number of lot with sequence Version 6.6.0 - 2022-10-31 diff --git a/modules/stock_lot/stock.py b/modules/stock_lot/stock.py index 4e567a0173..d05c8a5fbc 100644 --- a/modules/stock_lot/stock.py +++ b/modules/stock_lot/stock.py @@ -8,7 +8,8 @@ from sql import Column from sql.functions import CharLength from trytond.i18n import gettext -from trytond.model import Index, Model, ModelSQL, ModelView, fields +from trytond.model import ( + DeactivableMixin, Index, Model, ModelSQL, ModelView, fields) from trytond.model.exceptions import ( AccessError, RequiredValidationError, ValidationError) from trytond.modules.stock import StockMixin @@ -73,7 +74,7 @@ class LotMixin: return bool(self.product.lot_sequence) -class Lot(ModelSQL, ModelView, LotMixin, StockMixin): +class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin): "Stock Lot" __name__ = 'stock.lot' _rec_name = 'number' diff --git a/modules/stock_lot/view/lot_form.xml b/modules/stock_lot/view/lot_form.xml index a71a859cfb..be3ddcbe68 100644 --- a/modules/stock_lot/view/lot_form.xml +++ b/modules/stock_lot/view/lot_form.xml @@ -4,6 +4,11 @@ this repository contains the full copyright notices and license terms. -->