erp5_document_scanner: simplify code.

3 jobs for master in 0 seconds
Status Job ID Name Coverage
  External
failed ERP5.CodingStyleTest-Master

02:25:29

failed ERP5.UnitTest-Master

03:06:40

passed SlapOS.Eggs.UnitTest-Master.Python2

01:27:42