|
|
@ -37,7 +37,9 @@ def change_in_order_status(request, order, old): |
|
|
|
order.completed_date = datetime.utcnow() |
|
|
|
order.completed_date = datetime.utcnow() |
|
|
|
order.completed_by = request.user.user_name |
|
|
|
order.completed_by = request.user.user_name |
|
|
|
|
|
|
|
|
|
|
|
if noteworthy: |
|
|
|
if noteworthy and order.created_by != request.user.user_name: |
|
|
|
|
|
|
|
# only notify if the user who changed the order is not the one who |
|
|
|
|
|
|
|
# created it in the first place |
|
|
|
account = request.dbsession.\ |
|
|
|
account = request.dbsession.\ |
|
|
|
query(User).\ |
|
|
|
query(User).\ |
|
|
|
filter_by(user_name=order.created_by).\ |
|
|
|
filter_by(user_name=order.created_by).\ |
|
|
|