add change in Lot and Actions views
This commit is contained in:
parent
480afb3b12
commit
c172a8ca4b
|
@ -1452,32 +1452,6 @@ class Receive(JoinedTableMixin, ActionWithMultipleDevices):
|
|||
default=ReceiverRole.Intermediary)
|
||||
|
||||
|
||||
class ShareDeliveryNote(JoinedTableMixin, ActionWithMultipleDevices):
|
||||
"""To share a DeliveryNote to between owners."""
|
||||
# New variables for DeliveryNote
|
||||
supplier = db.Column() # String, nullable, ...
|
||||
supplier.comment = """Name of the organization/agent that create DeliveryNote."""
|
||||
date_delivery_note = db.Column()
|
||||
date_delivery_note.comment = """Date of note creation."""
|
||||
# Is the same of lot id??
|
||||
id_delivery_note = db.Column(UUID(as_uuid=True))
|
||||
id_delivery_note.comment = """Unique id of lot and delivery note."""
|
||||
deposit = db.Column()
|
||||
deposit.comment = """Total amount of deposit devices in Lot."""
|
||||
address_note = db.Column(UUID(as_uuid=True))
|
||||
address_note.comment = """Address identifier in the blockchain."""
|
||||
|
||||
agent_id = Column(UUID(as_uuid=True),
|
||||
ForeignKey(Agent.id),
|
||||
nullable=False,
|
||||
default=lambda: g.user.individual.id)
|
||||
|
||||
|
||||
class ConfirmDeliveryNote(JoinedTableMixin, ActionWithMultipleDevices):
|
||||
"""To confirm a DeliveryNote that has been shared."""
|
||||
pass
|
||||
|
||||
|
||||
class Migrate(JoinedTableMixin, ActionWithMultipleDevices):
|
||||
"""Moves the devices to a new database/inventory. Devices cannot be
|
||||
modified anymore at the previous database.
|
||||
|
|
|
@ -537,10 +537,6 @@ class Receive(ActionWithMultipleDevices):
|
|||
self.role = ... # type: ReceiverRole
|
||||
|
||||
|
||||
class ShareDeliveryNote(ActionWithMultipleDevices):
|
||||
pass
|
||||
|
||||
|
||||
class Migrate(ActionWithMultipleDevices):
|
||||
other = ... # type: Column
|
||||
|
||||
|
|
|
@ -442,15 +442,6 @@ class Receive(ActionWithMultipleDevices):
|
|||
role = EnumField(ReceiverRole)
|
||||
|
||||
|
||||
class ShareDeliveryNote(ActionWithMultipleDevices):
|
||||
__doc__ = m.ShareDeliveryNote.__doc__
|
||||
supplier = SanitizedStr(validate=Length(max=STR_SIZE), data_key='supplierName')
|
||||
date_delivery_note = DateTime(data_key='dateDeliveryNote')
|
||||
deposit = Integer(data_key='depositValue')
|
||||
address_note = UUID(dump_only=True)
|
||||
id_delivery_note = UUID(dump_only=True)
|
||||
|
||||
|
||||
class Migrate(ActionWithMultipleDevices):
|
||||
__doc__ = m.Migrate.__doc__
|
||||
other = URL()
|
||||
|
|
Reference in a new issue