savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Automatically set status to "Delivered" for yesterday's orders #822

Closed lamontfr closed 6 years ago

lamontfr commented 6 years ago

Expected Behaviour

JeanFrancoisFournier commented 6 years ago

Couldn't have said it better myself!

lamontfr commented 6 years ago

I finished coding the solution. I will now document usage.

lamontfr commented 6 years ago

@JeanFrancoisFournier @kousu I submitted the PR to be reviewed by Ling or Ernesto. I will wait a few days for their comments.

Here are the instructions concerning the new command :

kousu commented 6 years ago

This is related to #795 too, adding more work for #795.

kousu commented 6 years ago

It would be a lot easier to deploy this reliably if the date had a default, so that it's calculated internally instead of in shell where quoting rules are a nightmare to get right. You could use datetime.date.today() - datetime.timedelta(1)

lamontfr commented 6 years ago

@kousu @JeanFrancoisFournier I do not calculate the delivery date inside the command for one reason : I suspect that there is a date / timezone problem somewhere in Django / Docker (see Issue #820). Therefore, specifying the date explicitly on the command line makes it safer for the time being,