mirror of
https://github.com/bringout/euro-office.git
synced 2026-04-18 02:02:00 +02:00
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.
19 lines
506 B
Text
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();
|