change the name of lot with documentId

This commit is contained in:
Cayo Puigdefabregas 2021-02-03 22:06:27 +01:00
parent e17652abf6
commit 7a88d9d730
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ class DeliverynoteView(View):
dn = request.get_json()
dlvnote = Deliverynote(**dn)
# Create a lot
lot_name = dlvnote.supplier_email + "_" + datetime.datetime.utcnow().strftime("%B-%d-%Y")
lot_name = dlvnote.document_id + "_" + datetime.datetime.utcnow().strftime("%B-%d-%Y")
new_lot = Lot(name=lot_name)
dlvnote.lot_id = new_lot.id
db.session.add(new_lot)