I crreated a document with a doctype and later chagned that very same document to another doctpye. That means I changed the doctypetarget. LAter on I could not complete the document. I had the right to complete the doctype I set but not the former doctpye (at creation time).
That is what Carlos Ruiz wrote in chat:
WDocActionPanel:181 -> checking permission on doctype instead of doctypetarget
-> reactivate a pos order - change the document type to standard order
a user with permission to complete standard order but not pos order - will not be able to complete