erp5_officejs: refactoring to speed up page loading

/reviewed-on !965
2 jobs for arnau in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5-MASTER

03:33:23

failed ERP5-MASTER

08:11:59