odoo-modules/odoo-bringout-eurooffice-eurooffice_odoo_templates/eurooffice_odoo_templates/controllers/get_keys.docbuilder
Ernad Husremovic b59a9dc6bb init: Euro-Office Odoo 16.0 modules
Based on onlyoffice_odoo by Ascensio System SIA (ONLYOFFICE, LGPL-3).
Rebranded and adapted for Euro-Office by bring.out d.o.o.

Modules:
- eurooffice_odoo: base integration
- eurooffice_odoo_templates: document templates
- eurooffice_odoo_oca_dms: OCA DMS integration (replaces Enterprise documents)

All references renamed: onlyoffice -> eurooffice, ONLYOFFICE -> Euro-Office.
Original copyright notices preserved.
2026-03-31 17:24:17 +02:00

19 lines
506 B
Text

var oDocument = Api.GetDocument();
var aForms = oDocument.GetAllForms();
var sKeys = [];
aForms.forEach(aForm => {
sKeys.push(aForm.GetFormKey());
});
var json = JSON.stringify(sKeys);
GlobalVariable["json"] = json;
builder.CloseFile();
builder.CreateFile("docx");
var json = GlobalVariable["json"];
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText(json);
oDocument.Push(oParagraph);
Api.Save();
builder.SaveFile("txt", "keys.txt");
builder.CloseFile();