change name of automatic lot of deliverynote
This commit is contained in:
parent
e17652abf6
commit
f80db15506
|
@ -16,7 +16,7 @@ class DeliverynoteView(View):
|
||||||
dn = request.get_json()
|
dn = request.get_json()
|
||||||
dlvnote = Deliverynote(**dn)
|
dlvnote = Deliverynote(**dn)
|
||||||
# Create a lot
|
# Create a lot
|
||||||
lot_name = dlvnote.supplier_email + "_" + datetime.datetime.utcnow().strftime("%B-%d-%Y")
|
lot_name = dlvnote.document_id + "_" + datetime.datetime.utcnow().strftime("%Y-%m-%d")
|
||||||
new_lot = Lot(name=lot_name)
|
new_lot = Lot(name=lot_name)
|
||||||
dlvnote.lot_id = new_lot.id
|
dlvnote.lot_id = new_lot.id
|
||||||
db.session.add(new_lot)
|
db.session.add(new_lot)
|
||||||
|
|
Reference in a new issue