More options for supplier emails (WIP - help welcome)#1065
Draft
twothreenine wants to merge 1 commit into
Draft
Conversation
Previous behavior: The order email sent to the supplier will be sent as a copy (CC) to the user* and the supplier will be request to send any replies to that user*. *user: If sent by clicking on the "Send to supplier" button, the user who clicked the button; if sent automatically by end action, the user who created the order. New behavior: In Administration/Configuration, there's a new tab "Suppliers" where admins can set options for communication with suppliers. The default by migration is: The order email sent to the supplier will be sent as a copy (CC) to the associated users* and the supplier will be requested to send any replies to them. *associated users: both a) the user who created the order and b) (unless it was auto-sent) the user who clicked the button "Send to supplier." The copy of the email to the supplier can be changed to blind copy (BCC, default for new instances) or no copy at all. If a reply-to address is set, the supplier will be requested to send any replies to that address instead. If the "send reply copy" option below is checked, there will be multiple reply-to addresses: the specified address and the associated user(s) Old behavior: If not a single article has been ordered, the empty order will be sent to the supplier anyway (unless a minimum order quantity has been set and the respective end action been selected.) New behavior: Not to disrupt any workflows, this behavior remains the same if "Close the order and send it to the supplier" selected, but is pointed out now by the affix "(even if nothing has been ordered.)" There's a new option "Close the order and send it to the supplier unless nothing has been ordered." This checks if at least one article has been ordered (i.e. 1 box filled.) The behavior of "Close the order and send it to the supplier if the minimum quantity has been reached" is changed slightly: It also checks if at least one article has been ordered. This makes it a good general option that fulfills most use cases, so you don't have to memorize whether a minimum order quantity has been set for each supplier. TO DO: (help welcome!) - The "send reply copy" checkbox should only collapse if the email field above is filled. I didn't manage to solve this (yet) - I could only test the "unless nothing ordered" code indirectly, as the end actions didn't work in my local environment. The check worked in another method, but it should be tested if this exact code actually works (both for auto_close_and_send_min_quantity and auto_close_and_send_unless_empty.) - I tried to update the tests (since the min_order_quantity test didn't work anymore) and add more, but they don't work yet -- no email gets sent. I either made a mistake in the tests (didn't really grasp the "let" etc. logic yet) or the emailing function is broken for some reason. - Config test fails: I think the bcc option should be set as a default, or else no copy of the email to the supplier will be sent. How to fix this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Old behavior:
The order email sent to the supplier will be sent as a copy (CC) to the user* and the supplier will be request to send any replies to that user*.
*user: If sent by clicking on the "Send to supplier" button, the user who clicked the button; if sent automatically by end action, the user who created the order.
New behavior:
In Administration/Configuration, there's a new tab "Suppliers" where admins can set options for communication with suppliers.
The default by migration is: The order email sent to the supplier will be sent as a copy (CC) to the associated users* and the supplier will be requested to send any replies to them.
*associated users: both a) the user who created the order and b) (unless it was auto-sent) the user who clicked the button "Send to supplier."
The copy of the email to the supplier can be changed to blind copy (BCC, default for new instances) or no copy at all.
If a reply-to address is set, the supplier will be requested to send any replies to that address instead.
If the "send reply copy" option below is checked, there will be multiple reply-to addresses: the specified address and the associated user(s).
Old behavior:
If not a single article has been ordered, the empty order will be sent to the supplier anyway (unless a minimum order quantity has been set and the respective end action been selected.)
New behavior:
Not to disrupt any workflows, this behavior remains the same if "Close the order and send it to the supplier" selected, but is pointed out now by the affix "(even if nothing has been ordered.)"
There's a new option "Close the order and send it to the supplier unless nothing has been ordered." This checks if at least one article has been ordered (i.e. 1 box filled.)
The behavior of "Close the order and send it to the supplier if the minimum quantity has been reached" is changed slightly: It also checks if at least one article has been ordered. This makes it a good general option that fulfills most use cases, so you don't have to memorize whether a minimum order quantity has been set for each supplier.
TO DO: (help welcome!)