add temporary lots too in reports

This commit is contained in:
Cayo Puigdefabregas 2022-06-20 14:35:57 +02:00
parent 8e11aff88b
commit c6c443899a
1 changed files with 1 additions and 5 deletions

View File

@ -668,15 +668,11 @@ class ExportsView(View):
for dev in self.find_devices(): for dev in self.find_devices():
for lot in dev.lots: for lot in dev.lots:
type_transfer = lot.type_transfer()
if type_transfer in ['Temporary', '']:
continue
row = [ row = [
dev.devicehub_id, dev.devicehub_id,
lot.id, lot.id,
lot.name, lot.name,
type_transfer, lot.type_transfer(),
lot.transfer and (lot.transfer.closed and 'Closed' or 'Open') or '', lot.transfer and (lot.transfer.closed and 'Closed' or 'Open') or '',
lot.transfer and lot.transfer.code or '', lot.transfer and lot.transfer.code or '',
lot.transfer and lot.transfer.date or '', lot.transfer and lot.transfer.date or '',