public static void main(String[] args) {
    ITemplateEngine templateEngine = new FreemarkerTemplateEngine();
    IXDocReport report = new ODTReport();
    report.setDebugger(SysOutDebugger.INSTANCE);
    report.setTemplateEngine(templateEngine);

    FieldsMetadata metadata = new FieldsMetadata();
    metadata.addFieldAsList("lines.reference");
    report.setFieldsMetadata(metadata);

    try {
      // File f = new File();;
      report.load(TestODTWithFreemarker.class.getResourceAsStream("TestODTWithFreemarker.odt"));
      IContext context = report.createContext();
      Project project = new Project("XDocReport");
      context.put("project", project);

      List<Command> commands = new ArrayList<Command>();
      commands.add(new Command("ref1"));
      commands.add(new Command("ref2"));
      context.put("lines", commands);

      context.put("adresse_magasin", "yessssssssssss");
      File file = new File("out/TestODTWithFreemarker_Out.docx");
      report.process(context, new FileOutputStream(file));

    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (XDocReportException e) {
      e.printStackTrace();
    }
  }