Qual: Uniformize code. Trigger PROJECT_BUILDDOC is removed because
building a doc is not a business event. For technical action after
creation of a pdf, hook "afterPDFCreation" must be used instead.
Revert "Fix: define new ref before trigger"

This reverts commit 6ab41766c864f2de8980f0d9bd87805d40bb4e3e.