diff --git a/ereuse_devicehub/resources/action/__init__.py b/ereuse_devicehub/resources/action/__init__.py index 0c3d3e9c..b7405368 100644 --- a/ereuse_devicehub/resources/action/__init__.py +++ b/ereuse_devicehub/resources/action/__init__.py @@ -255,6 +255,11 @@ class MakeAvailable(ActionDef): SCHEMA = schemas.MakeAvailable +class Delete(ActionDef): + VIEW = None + SCHEMA = schemas.Delete + + class ConfirmDef(ActionDef): VIEW = None SCHEMA = schemas.Confirm diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 603462b8..c1cade90 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -1680,6 +1680,12 @@ class MoveOnDocument(JoinedTableMixin, ActionWithMultipleTradeDocuments): container_to_id.comment = """This is the trade document used as container in a outgoing lot""" +class Delete(JoinedTableMixin, ActionWithMultipleDevices): + """The act save in device who and why this devices was delete. + We never delete one device, but we can deactivate.""" + pass + + class Migrate(JoinedTableMixin, ActionWithMultipleDevices): """Moves the devices to a new database/inventory. Devices cannot be modified anymore at the previous database. diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index ec11dd8f..8671b5a8 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -830,6 +830,10 @@ class TransferOwnershipBlockchain(Trade): __doc__ = m.TransferOwnershipBlockchain.__doc__ +class Delete(ActionWithMultipleDevices): + __doc__ = m.Delete.__doc__ + + class Migrate(ActionWithMultipleDevices): __doc__ = m.Migrate.__doc__ other = URL()