diff --git a/CHANGELOG documents.md b/CHANGELOG documents.md new file mode 100644 index 0000000..5302f4f --- /dev/null +++ b/CHANGELOG documents.md @@ -0,0 +1,18 @@ +# Change Log + +## 4.0.1 +## Changed +- replace docxf with pdf as a form template + +## 2.0.1 +## Added +- support Documents module +- opening file from Documents module +- creating file in Document module + +## 1.0.0 +## Added +- edit option for DOCX, DOCXF, XLSX, PPTX +- view option for DJVU, DOC, DOCM, DOT, DOTM, DOTX, EPUB, FB2, FODT, HTML, MHT, ODT, OFORM, OTT, OXPS, PDF, RTF, TXT, XPS, XML, CSV, FODS, ODS, OTS, XLS, XLSB, XLSM, XLT, XLTM, XLTX, FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM +- collaboration editing +- Translations for DE, EN, ES, FR, IT, PT-BR, RU, ZH-CN diff --git a/CHANGELOG templates.md b/CHANGELOG templates.md new file mode 100644 index 0000000..cfeec91 --- /dev/null +++ b/CHANGELOG templates.md @@ -0,0 +1,8 @@ +# Change Log + +## 2.0.2 +## Added +- new templates module +- creating and editing templates in editor +- print with template +- access rights to templates module diff --git a/CHANGELOG.md b/CHANGELOG.md index 024e438..5a6d9e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 4.0.0 +## Added +- advanced server settings for specifying internal addresses +- validation of server settings on the settings page +- trial period of 30 days for the demo server +- link to docs cloud + +## Changed +- replace docxf with pdf as a form template + ## 2.1.0 ## Added - compatible with Odoo 17 @@ -7,8 +17,6 @@ ## 2.0.0 ## Added - support Documents module -- opening file from Documents module -- creating file in Document module ## 1.0.0 ## Added diff --git a/README.md b/README.md index 07459ed..e3a1923 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ The app allows to: Supported formats: -* For editing: DOCX, DOCXF, XLSX, PPTX. -* For viewing: DJVU, DOC, DOCM, DOT, DOTM, DOTX, EPUB, FB2, FODT, HTML, MHT, ODT, OFORM, OTT, OXPS, PDF, RTF, TXT, XPS, XML, CSV, FODS, ODS, OTS, XLS, XLSB, XLSM, XLT, XLTM, XLTX, FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM. +* For editing: DOCX, XLSX, PPTX, PDF. +* For viewing: DJVU, DOC, DOCM, DOCXF, DOT, DOTM, DOTX, EPUB, FB2, FODT, HTML, MHT, ODT, OFORM, OTT, OXPS, RTF, TXT, XPS, XML, CSV, FODS, ODS, OTS, XLS, XLSB, XLSM, XLT, XLTM, XLTX, FODP, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM. ## Installing ONLYOFFICE Docs diff --git a/onlyoffice_odoo/__manifest__.py b/onlyoffice_odoo/__manifest__.py index a70c59e..f6be678 100644 --- a/onlyoffice_odoo/__manifest__.py +++ b/onlyoffice_odoo/__manifest__.py @@ -10,7 +10,7 @@ 'website': "https://www.onlyoffice.com", 'category': 'Productivity', - 'version': '2.1.0', + 'version': '4.0.0', 'depends': ['base', 'mail'], diff --git a/onlyoffice_odoo/controllers/controllers.py b/onlyoffice_odoo/controllers/controllers.py index 1175102..f03540c 100644 --- a/onlyoffice_odoo/controllers/controllers.py +++ b/onlyoffice_odoo/controllers/controllers.py @@ -8,6 +8,7 @@ import logging import markupsafe import re +import string from odoo import http from odoo.http import request @@ -15,6 +16,7 @@ from odoo.addons.onlyoffice_odoo.utils import file_utils from odoo.addons.onlyoffice_odoo.utils import jwt_utils from odoo.addons.onlyoffice_odoo.utils import config_utils +from odoo.addons.onlyoffice_odoo.utils import url_utils from mimetypes import guess_type from urllib.request import urlopen @@ -24,6 +26,17 @@ class Onlyoffice_Connector(http.Controller): + @http.route("/onlyoffice/file/content/test.txt", auth="public") + def get_test_file(self): + content = "test" + headers = [ + ("Content-Length", len(content)), + ("Content-Type", "text/plain"), + ("Content-Disposition", "attachment; filename=test.txt") + ] + response = request.make_response(content, headers) + return response + @http.route("/onlyoffice/file/content/", auth="public") def get_file_content(self, attachment_id, oo_security_token=None, access_token=None): @@ -102,7 +115,7 @@ def editor_callback(self, attachment_id, oo_security_token=None, access_token=No status = body["status"] if (status == 2) | (status == 3): # mustsave, corrupted - file_url = body.get("url") + file_url = url_utils.replace_public_url_to_internal(request.env, body.get("url")) attachment.write({"raw": urlopen(file_url).read(), "mimetype": guess_type(file_url)[0]}) except Exception as ex: @@ -119,9 +132,9 @@ def prepare_editor_values(self, attachment, access_token, can_write): data = attachment.read(["id", "checksum", "public", "name", "access_token"])[0] docserver_url = config_utils.get_doc_server_public_url(request.env) - odoo_url = config_utils.get_odoo_url(request.env) + odoo_url = config_utils.get_base_or_odoo_url(request.env) - filename = data["name"] + filename = self.filter_xss(data["name"]) security_token = jwt_utils.encode_payload(request.env, { "id": request.env.user.id }, config_utils.get_internal_jwt_secret(request.env)) path_part = str(data["id"]) + "?oo_security_token=" + security_token + ("&access_token=" + access_token if access_token else "") @@ -175,3 +188,9 @@ def get_user_from_token(self, token): user_id = jwt_utils.decode_token(request.env, token, config_utils.get_internal_jwt_secret(request.env))["id"] user = request.env["res.users"].sudo().browse(user_id).exists().ensure_one() return user + + def filter_xss(self, text): + allowed_symbols = set(string.ascii_letters + string.digits + "_-.") + text = "".join(char for char in text if char in allowed_symbols) + + return text \ No newline at end of file diff --git a/onlyoffice_odoo/i18n/de.po b/onlyoffice_odoo/i18n/de.po index d53e90e..c50e6fb 100644 --- a/onlyoffice_odoo/i18n/de.po +++ b/onlyoffice_odoo/i18n/de.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 10:49+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 15:33+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -15,7 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Adresse des Document Editing Service für " +"interne Anfragen vom Server" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -25,18 +34,39 @@ msgstr "JWT-Header von Document Server" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Secret" -msgstr "JWT-Geheimschlüssel von Document Server" +msgstr "" +"JWT-Geheimschlüssel von Document Server" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server Url" msgstr "URL von Document Server" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Serveradresse für interne Anfragen des Document " +"Editing Service" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Konfigurationseinstellungen" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Zum Demoserver von ONLYOFFICE Docs verbinden" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "Innere URL von Document Server" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +79,13 @@ msgstr "JWT-Geheimschlüssel von Document Server" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL von Document Server" +msgid "Document Server Public URL" +msgstr "Öffentliche URL von Document Server" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "JETZT ERHALTEN" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +102,30 @@ msgstr "Interner JWT-Geheimschlüssel" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE Docs-Server" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE kann nicht erreicht werden. Bitte kontaktieren Sie den " +"Administrator." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICE-Logo" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "Odoo-URL" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +133,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "In ONLYOFFICE öffnen" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Andere" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +147,24 @@ msgstr "Sicherheit" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Einstellungen" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"Der 30-tägige Testzeitraum ist vorbei. Sie können sich nicht mehr mit dem " +"Demo-Server von ONLYOFFICE Docs verbinden" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Dies ist ein öffentlicher Testserver, bitte verwenden Sie ihn nicht für " +"private sensible Daten. Der Server wird für einen Zeitraum von 30 Tagen " +"verfügbar sein." diff --git a/onlyoffice_odoo/i18n/en.po b/onlyoffice_odoo/i18n/en.po index c9c372c..a6e9b12 100644 --- a/onlyoffice_odoo/i18n/en.po +++ b/onlyoffice_odoo/i18n/en.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0-20221116\n" +"Project-Id-Version: Odoo Server 16.0+e-20240603\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-14 10:14+0000\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 08:14+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,6 +16,13 @@ msgstr "" "Language: en\n" "Plural-Forms: \n" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Header" @@ -28,7 +35,14 @@ msgstr "" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form -msgid "Document Server URL" +msgid "Document Server Url" +msgstr "" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" msgstr "" #. module: onlyoffice_odoo @@ -36,6 +50,17 @@ msgstr "" msgid "Config Settings" msgstr "" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -48,7 +73,12 @@ msgstr "" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" +msgid "Document Server Public URL" +msgstr "" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" msgstr "" #. module: onlyoffice_odoo @@ -66,6 +96,28 @@ msgstr "" msgid "ONLYOFFICE" msgstr "" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +126,11 @@ msgstr "" msgid "Open in ONLYOFFICE" msgstr "" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +140,19 @@ msgstr "" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE" +" Docs server" +msgstr "" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" diff --git a/onlyoffice_odoo/i18n/es.po b/onlyoffice_odoo/i18n/es.po index 5b5c16c..63b123e 100644 --- a/onlyoffice_odoo/i18n/es.po +++ b/onlyoffice_odoo/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 10:56+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 16:20+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: es_ES\n" @@ -15,28 +15,59 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Dirección del Servicio de edición de documentos " +"para solicitudes internas del servidor" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Header" -msgstr "Encabezado JWT del Servidor de documentos" +msgstr "" +"Encabezado JWT del Servidor de documentos" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Secret" -msgstr "Secreto JWT del Servidor de documentos" +msgstr "" +"Secreto JWT del Servidor de documentos" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server Url" msgstr "URL del Servidor de documentos" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Dirección del servidor para solicitudes " +"internas del Servicio de edición de documentos" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Parámetros de configuración" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Conectarse al servidor demo de ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "URL interna del Servidor de documentos" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +80,13 @@ msgstr "Secreto JWT del Servidor de documentos" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL del Servidor de documentos" +msgid "Document Server Public URL" +msgstr "URL pública del Servidor de Documentos" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "OBTENER AHORA" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +103,30 @@ msgstr "Secreto JWT interno" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Servidor de ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE no puede ser alcanzado. Por favor, póngase en contacto con el " +"administrador." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "Logo de ONLYOFFICE" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "URL de Odoo" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +134,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "Abrir en ONLYOFFICE" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Otros" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +148,23 @@ msgstr "Seguridad" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Ajustes" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"El período de prueba de 30 días ha terminado, ya no se puede conectar al " +"servidor de ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Este es un servidor público de prueba, por favor no lo utilice para datos " +"privados. El servidor estará disponible durante un período de 30 días." diff --git a/onlyoffice_odoo/i18n/fr.po b/onlyoffice_odoo/i18n/fr.po index f0fd2ba..1a54ea4 100644 --- a/onlyoffice_odoo/i18n/fr.po +++ b/onlyoffice_odoo/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 10:50+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 16:28+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" @@ -15,7 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Adresse du service d'édition de documents pour " +"les demandes internes du serveur" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -32,11 +41,31 @@ msgstr "Secret JWT du Document Server" msgid "Document Server Url" msgstr "URL du Document Server" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Adresse du serveur pour les demandes internes " +"du Service d'édition de documents" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Paramètres de configuration" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Connexion au serveur de démonstration ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "URL interne de Document Server" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +78,13 @@ msgstr "Secret JWT du Document Server" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL du Document Server" +msgid "Document Server Public URL" +msgstr "URL public de Document Server" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "OBTENIR MAINTENANT" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +101,28 @@ msgstr "Secret JWT interne" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Serveur ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICE n'est pas joignable. Veuillez contacter l'administrateur." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "Logo ONLYOFFICE" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "URL de Odoo" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +130,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "Ouvrir dans ONLYOFFICE" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Autre" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +144,24 @@ msgstr "Sécurité" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Paramètres" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"La période de test de 30 jours est terminée, vous ne pouvez plus vous " +"connecter à la démo ONLYOFFICE Serveur Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Il s'agit d'un serveur de test public, veuillez ne pas l'utiliser pour des " +"données sensibles privées. Le serveur sera disponible pendant une période de " +"30 jours." diff --git a/onlyoffice_odoo/i18n/it.po b/onlyoffice_odoo/i18n/it.po index 812dbb3..0e80402 100644 --- a/onlyoffice_odoo/i18n/it.po +++ b/onlyoffice_odoo/i18n/it.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 10:57+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 16:32+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: it_IT\n" @@ -15,12 +15,22 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Indirizzo del servizio di modifica dei " +"documenti per richieste interne del server" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Header" -msgstr "Intestazione JWT del Document Server" +msgstr "" +"Intestazione JWT del Document Server" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -32,11 +42,31 @@ msgstr "Segreto JWT del Document Server" msgid "Document Server Url" msgstr "URL del Document Server" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Indirizzo del server per richieste interne dal " +"Servizio di modifica dei documenti" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Impostazioni di configurazione" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Connessione al server demo ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "URL interno del server dei documenti" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +79,13 @@ msgstr "Segreto JWT del Document Server" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL del Document Server" +msgid "Document Server Public URL" +msgstr "URL pubblico del server dei documenti" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "OTTIENI ORA" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +102,29 @@ msgstr "Segreto JWT interno" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Server ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE non può essere raggiunto. Si prega di contattare l'amministratore." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "Logo di ONLYOFFICE" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "URL di Odoo" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +132,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "Aprire in ONLYOFFICE" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Altro" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +146,23 @@ msgstr "Sicurezza" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Impostazioni" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"Il periodo di prova di 30 giorni è terminato, non puoi più connetterti alla " +"demo ONLYOFFICE Docs Server" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Questo è un server di test pubblico, si prega di non usarlo per dati privati " +"e sensibili. Il server sarà disponibile per un periodo di 30 giorni." diff --git a/onlyoffice_odoo/i18n/ja.po b/onlyoffice_odoo/i18n/ja.po index 28bab83..db13790 100644 --- a/onlyoffice_odoo/i18n/ja.po +++ b/onlyoffice_odoo/i18n/ja.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 11:02+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 17:31+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: ja_JP\n" @@ -15,7 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"サーバーからの内部リクエスト用の文書編集サービス" +"アドレス" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -32,11 +41,31 @@ msgstr "Document ServerのJWTシクレット msgid "Document Server Url" msgstr "Document ServerのURL" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"ドキュメント編集サービスからの内部リクエスト用" +"サーバアドレス" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "構成の設定" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "ONLYOFFICE Docsのデモサーバーへの接続" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "ドキュメントサーバ内部URL" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +78,13 @@ msgstr "Document ServerのJWTシクレット" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "Document ServerのURL" +msgid "Document Server Public URL" +msgstr "ドキュメントサーバ公開URL" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "今すぐ入手" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +101,28 @@ msgstr "内部JWTシクレット" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE Docsサーバ" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICEにアクセスできません。管理者にご連絡ください。" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICEロゴ" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "Odoo URL" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +130,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "ONLYOFFICEで開く" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "その他" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +144,23 @@ msgstr "セキュリティー" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "設定" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"30日間のテスト期間が終了し、ONLYOFFICE Docsのデモサーバーに接続できなくなりま" +"した" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"このサーバーは公開テストサーバーですので、個人の機密データには使用しないでく" +"ださい。このサーバーは30日間利用可能です。" diff --git a/onlyoffice_odoo/i18n/pt_BR.po b/onlyoffice_odoo/i18n/pt_BR.po index 0a9317c..81b3cf9 100644 --- a/onlyoffice_odoo/i18n/pt_BR.po +++ b/onlyoffice_odoo/i18n/pt_BR.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 11:00+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 16:53+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: pt_BR\n" @@ -15,28 +15,59 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Endereço do Serviço de Edição de Documentos " +"para interno solicitações do servidor" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Header" -msgstr "Cabeçalho JWT do servidor de documentos" +msgstr "" +"Cabeçalho JWT do servidor de documentos" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Secret" -msgstr "Segredo JWT do servidor de documentos" +msgstr "" +"Segredo JWT do servidor de documentos" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server Url" msgstr "URL do servidor de documentos" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Endereço do servidor para solicitações internas " +"do Serviço de edição de documentos" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Configurações de configuração" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Conecte-se ao servidor de demonstração do ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "URL interno do servidor de documentos" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +80,13 @@ msgstr "Segredo JWT do servidor de documentos" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL do servidor de documentos" +msgid "Document Server Public URL" +msgstr "URL pública do servidor de documentos" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "OBTENHA AGORA" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +103,29 @@ msgstr "Segredo JWT Interno" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Servidor ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE não pode ser alcançado. Entre em contato com o administrador." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "Logotipo ONLYOFFICE" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "URL Odoo" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +133,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "Abrir no ONLYOFFICE" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Outros" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +147,23 @@ msgstr "Segurança" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Configurações" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"O período de teste de 30 dias acabou, você não pode mais se conectar ao " +"ONLYOFFICE de demonstração Servidor Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Este é um servidor de teste público, por favor, não o use para dados " +"confidenciais. O servidor estará disponível durante um período de 30 dias." diff --git a/onlyoffice_odoo/i18n/ru.po b/onlyoffice_odoo/i18n/ru.po index e8072bc..70e683a 100644 --- a/onlyoffice_odoo/i18n/ru.po +++ b/onlyoffice_odoo/i18n/ru.po @@ -6,16 +6,26 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 10:45+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 17:24+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: ru_RU\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Poedit 3.2.2\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"Адрес сервиса редактирования документов для " +"внутренних запросов с сервера" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -25,18 +35,39 @@ msgstr "Заголовок JWT сервера до #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server JWT Secret" -msgstr "Секретный JWT ключ сервера документов" +msgstr "" +"Секретный JWT ключ сервера документов" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Document Server Url" msgstr "URL сервера документов" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"Адрес сервера для внутренних запросов от " +"сервиса редактирования документов" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "Настройки конфигурации" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "Подключиться к демо-серверу ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "Внутренний URL сервера документов" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +80,13 @@ msgstr "Секретный JWT ключ сервера документов" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "URL сервера документов" +msgid "Document Server Public URL" +msgstr "Публичный URL сервера документов" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "ПОЛУЧИТЬ СЕЙЧАС" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +103,28 @@ msgstr "Внутренний секретный JWT ключ" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Сервер ONLYOFFICE Docs" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICE недоступен. Пожалуйста, свяжитесь с администратором." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "Логотип ONLYOFFICE" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "URL Odoo" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +132,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "Открыть в ONLYOFFICE" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "Другое" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +146,23 @@ msgstr "Безопасность" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "Настройки" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"30-дневный тестовый период закончился, вы больше не можете подключиться к " +"демо-серверу ONLYOFFICE Docs." + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "" +"Это общедоступный тестовый сервер, не используйте его для конфиденциальных " +"данных. Сервер будет доступен в течение 30-дневного периода." diff --git a/onlyoffice_odoo/i18n/zh_CN.po b/onlyoffice_odoo/i18n/zh_CN.po index 5f79c31..d8b9243 100644 --- a/onlyoffice_odoo/i18n/zh_CN.po +++ b/onlyoffice_odoo/i18n/zh_CN.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-02-16 11:00+0300\n" +"POT-Creation-Date: 2024-07-03 08:14+0000\n" +"PO-Revision-Date: 2024-07-03 17:10+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: zh_CN\n" @@ -15,7 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Document Editing Service address for internal " +"requests from the server" +msgstr "" +"文档编辑服务地址,用于来自服务器的内部请求" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -32,11 +41,31 @@ msgstr "文档服务器 JWT 秘密" msgid "Document Server Url" msgstr "文档服务器网址(URL)" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"Server address for internal requests from the " +"Document Editing Service" +msgstr "" +"服务器地址,用于来自文档编辑服务的内部请求" + #. module: onlyoffice_odoo #: model:ir.model,name:onlyoffice_odoo.model_res_config_settings msgid "Config Settings" msgstr "配置设置" +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_demo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Connect to demo ONLYOFFICE Docs server" +msgstr "连接到 ONLYOFFICE 文档服务器演示版" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_inner_url +msgid "Document Server Inner URL" +msgstr "文档服务器内部 URL" + #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_jwt_header msgid "Document Server JWT Header" @@ -49,8 +78,13 @@ msgstr "文档服务器 JWT 秘密" #. module: onlyoffice_odoo #: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_public_url -msgid "Document Server URL" -msgstr "文档服务器网址(URL)" +msgid "Document Server Public URL" +msgstr "文档服务器公共 URL" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "GET NOW" +msgstr "立即获取" #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form @@ -67,6 +101,28 @@ msgstr "内部 JWT 秘密" msgid "ONLYOFFICE" msgstr "ONLYOFFICE" +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE 文档服务器" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICE 无法访问,请联系管理员。" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.onlyoffice_editor +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICE logo" + +#. module: onlyoffice_odoo +#: model:ir.model.fields,field_description:onlyoffice_odoo.field_res_config_settings__doc_server_odoo_url +msgid "Odoo URL" +msgstr "Odoo URL" + #. module: onlyoffice_odoo #. odoo-javascript #: code:addons/onlyoffice_odoo/static/src/components/attachment_card_onlyoffice/attachment_card_onlyoffice.xml:0 @@ -74,6 +130,11 @@ msgstr "ONLYOFFICE" msgid "Open in ONLYOFFICE" msgstr "用 ONLYOFFICE 打开" +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "Other" +msgstr "其他" + #. module: onlyoffice_odoo #: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form msgid "Security" @@ -83,3 +144,19 @@ msgstr "安全" #: model:ir.actions.act_window,name:onlyoffice_odoo.action_onlyoffice_config_settings msgid "Settings" msgstr "设置" + +#. module: onlyoffice_odoo +#. odoo-javascript +#: code:addons/onlyoffice_odoo/static/src/models/attachment_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "30 天测试期结束后,您将无法再访问 ONLYOFFICE文档服务器演示版" + +#. module: onlyoffice_odoo +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo.res_config_settings_view_form +msgid "" +"This is a public test server, please do not use it for private sensitive " +"data. The server will be available during a 30-day period." +msgstr "这是公共测试服务器,请勿用于私人敏感 数据。服务器将在 30 天内可用。" diff --git a/onlyoffice_odoo/models/res_config_settings.py b/onlyoffice_odoo/models/res_config_settings.py index f07db67..6f46028 100644 --- a/onlyoffice_odoo/models/res_config_settings.py +++ b/onlyoffice_odoo/models/res_config_settings.py @@ -4,25 +4,51 @@ # (c) Copyright Ascensio System SIA 2024 # -from odoo import fields, models, _ +from odoo import api, fields, models from odoo.addons.onlyoffice_odoo.utils import config_utils +from odoo.addons.onlyoffice_odoo.utils import validation_utils class ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" - doc_server_public_url = fields.Char("Document Server URL") + doc_server_public_url = fields.Char("Document Server Public URL") + doc_server_odoo_url = fields.Char("Odoo URL") + doc_server_inner_url = fields.Char("Document Server Inner URL") doc_server_jwt_secret = fields.Char("Document Server JWT Secret") doc_server_jwt_header = fields.Char("Document Server JWT Header") + doc_server_demo = fields.Boolean("Connect to demo ONLYOFFICE Docs server") internal_jwt_secret = fields.Char("Internal JWT Secret") - def set_values(self): - res = super().set_values() + @api.onchange("doc_server_public_url") + def onchange_doc_server_public_url(self): + if self.doc_server_public_url and not validation_utils.valid_url(self.doc_server_public_url): + return { + "warning": { + "title": "Warning", + "message": "Incorrect Document Server URL" + } + } - config_utils.set_doc_server_public_url(self.env, self.doc_server_public_url) + @api.model + def save_config_values(self): + if validation_utils.valid_url(self.doc_server_public_url): + config_utils.set_doc_server_public_url(self.env, self.doc_server_public_url) + if validation_utils.valid_url(self.doc_server_odoo_url): + config_utils.set_doc_server_odoo_url(self.env, self.doc_server_odoo_url) + if validation_utils.valid_url(self.doc_server_inner_url): + config_utils.set_doc_server_inner_url(self.env, self.doc_server_inner_url) config_utils.set_jwt_secret(self.env, self.doc_server_jwt_secret) config_utils.set_jwt_header(self.env, self.doc_server_jwt_header) + config_utils.set_demo(self.env, self.doc_server_demo) + + def set_values(self): + res = super().set_values() + сurrent_demo_state = config_utils.get_demo(self.env) + if not сurrent_demo_state and not self.doc_server_demo: + validation_utils.settings_validation(self) + self.save_config_values() return res @@ -30,15 +56,20 @@ def get_values(self): res = super().get_values() doc_server_public_url = config_utils.get_doc_server_public_url(self.env) + doc_server_odoo_url = config_utils.get_base_or_odoo_url(self.env) + doc_server_inner_url = config_utils.get_doc_server_inner_url(self.env) doc_server_jwt_secret = config_utils.get_jwt_secret(self.env) doc_server_jwt_header = config_utils.get_jwt_header(self.env) + doc_server_demo = config_utils.get_demo(self.env) res.update( doc_server_public_url=doc_server_public_url, + doc_server_odoo_url=doc_server_odoo_url, + doc_server_inner_url=doc_server_inner_url, doc_server_jwt_secret=doc_server_jwt_secret, doc_server_jwt_header=doc_server_jwt_header, + doc_server_demo=doc_server_demo ) return res - # we can validate settings here diff --git a/onlyoffice_odoo/static/assets/document_templates/README.md b/onlyoffice_odoo/static/assets/document_templates/README.md index 1da27e6..796bb37 100644 --- a/onlyoffice_odoo/static/assets/document_templates/README.md +++ b/onlyoffice_odoo/static/assets/document_templates/README.md @@ -2,14 +2,12 @@ Template files used to create new documents and documents with sample content in: -* [Confluence ONLYOFFICE integration plugin](https://github.com/ONLYOFFICE/onlyoffice-confluence) * [Jira ONLYOFFICE integration app](https://github.com/ONLYOFFICE/onlyoffice-jira) * [HumHub ONLYOFFICE integration plugin](https://github.com/ONLYOFFICE/onlyoffice-humhub) * [Liferay ONLYOFFICE Connector](https://github.com/ONLYOFFICE/onlyoffice-liferay) -* [Moodle ONLYOFFICE Integration plugin](https://github.com/ONLYOFFICE/moodle-mod_onlyofficeeditor) * [Nextcloud ONLYOFFICE integration app](https://github.com/ONLYOFFICE/onlyoffice-nextcloud) * [Nuxeo ONLYOFFICE integration plugin](https://github.com/ONLYOFFICE/onlyoffice-nuxeo) -* [ONLYOFFICE Alfresco module package](https://github.com/ONLYOFFICE/onlyoffice-alfresco) * [ONLYOFFICE App for Pipedrive](https://github.com/onlyoffice/onlyoffice-pipedrive) +* [ONLYOFFICE DocSpace App for Zoom](https://github.com/onlyoffice/onlyoffice-docspace-zoom) * [ownCloud ONLYOFFICE integration app](https://github.com/onlyoffice/onlyoffice-owncloud) * [Plone ONLYOFFICE integration plugin](https://github.com/onlyoffice/onlyoffice-plone) diff --git a/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.docx b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.docx new file mode 100644 index 0000000..648149f Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.docx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pdf b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pdf new file mode 100644 index 0000000..c37599b Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pptx b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pptx new file mode 100644 index 0000000..284c121 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.pptx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.xlsx new file mode 100644 index 0000000..5881eb8 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ar-SA/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.docxf b/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.docxf deleted file mode 100644 index 955fa5b..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.pdf b/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.pdf new file mode 100644 index 0000000..ed5f73a Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.xlsx index e061c35..b0e5163 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/az-Latn-AZ/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.docxf b/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.docxf deleted file mode 100644 index 17a8f45..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.pdf b/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.pdf new file mode 100644 index 0000000..c77cb93 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/bg-BG/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.docxf b/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.docxf deleted file mode 100644 index 9f5770a..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.pdf b/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.pdf new file mode 100644 index 0000000..9ee58dc Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/cs-CZ/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/de-DE/new.docxf b/onlyoffice_odoo/static/assets/document_templates/de-DE/new.docxf deleted file mode 100644 index f502c9e..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/de-DE/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/de-DE/new.pdf b/onlyoffice_odoo/static/assets/document_templates/de-DE/new.pdf new file mode 100644 index 0000000..73a6cdb Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/de-DE/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/el-GR/new.docxf b/onlyoffice_odoo/static/assets/document_templates/el-GR/new.docxf deleted file mode 100644 index c8261bc..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/el-GR/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/el-GR/new.pdf b/onlyoffice_odoo/static/assets/document_templates/el-GR/new.pdf new file mode 100644 index 0000000..53c6533 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/el-GR/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/el-GR/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/el-GR/new.xlsx index 140eaf0..03e2f95 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/el-GR/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/el-GR/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/en-GB/new.docxf b/onlyoffice_odoo/static/assets/document_templates/en-GB/new.docxf deleted file mode 100644 index 72ad98d..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/en-GB/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/en-GB/new.pdf b/onlyoffice_odoo/static/assets/document_templates/en-GB/new.pdf new file mode 100644 index 0000000..ec490f8 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/en-GB/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/en-US/new.docxf b/onlyoffice_odoo/static/assets/document_templates/en-US/new.docxf deleted file mode 100644 index fb04a48..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/en-US/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/en-US/new.pdf b/onlyoffice_odoo/static/assets/document_templates/en-US/new.pdf new file mode 100644 index 0000000..94bfad3 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/en-US/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/es-ES/new.docxf b/onlyoffice_odoo/static/assets/document_templates/es-ES/new.docxf deleted file mode 100644 index 7652918..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/es-ES/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/es-ES/new.pdf b/onlyoffice_odoo/static/assets/document_templates/es-ES/new.pdf new file mode 100644 index 0000000..4b9e831 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/es-ES/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/es-ES/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/es-ES/new.xlsx index f7a931c..03d8d0c 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/es-ES/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/es-ES/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.docxf b/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.docxf deleted file mode 100644 index 647ab99..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.pdf b/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.pdf new file mode 100644 index 0000000..a2ef8e2 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/eu-ES/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.docxf b/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.docxf deleted file mode 100644 index 5ab3e86..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.pdf b/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.pdf new file mode 100644 index 0000000..3fd2db0 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.xlsx index 8e027e2..df986ff 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/fr-FR/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.docxf b/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.docxf deleted file mode 100644 index 8d85f60..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.pdf b/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.pdf new file mode 100644 index 0000000..e4fbbae Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/gl-ES/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.docxf b/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.docxf deleted file mode 100644 index 80a675d..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.pdf b/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.pdf new file mode 100644 index 0000000..e4fed93 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/hy-AM/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/it-IT/new.docxf b/onlyoffice_odoo/static/assets/document_templates/it-IT/new.docxf deleted file mode 100644 index 44a14b2..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/it-IT/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/it-IT/new.pdf b/onlyoffice_odoo/static/assets/document_templates/it-IT/new.pdf new file mode 100644 index 0000000..4cf6edd Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/it-IT/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/it-IT/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/it-IT/new.xlsx index e5f6b52..24f63f5 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/it-IT/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/it-IT/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.docxf b/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.docxf deleted file mode 100644 index cbff106..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.pdf b/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.pdf new file mode 100644 index 0000000..1ec71cd Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.xlsx index 342954a..cee888a 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/ja-JP/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.docxf b/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.docxf deleted file mode 100644 index 30308ed..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.pdf b/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.pdf new file mode 100644 index 0000000..735e2eb Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.xlsx index 5aebd8c..1709b8c 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/ko-KR/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.docxf b/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.docxf deleted file mode 100644 index 15ee74e..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.pdf b/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.pdf new file mode 100644 index 0000000..9986452 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.xlsx index 8b6396c..cbb8258 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/lv-LV/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.docxf b/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.docxf deleted file mode 100644 index ced0d01..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.pdf b/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.pdf new file mode 100644 index 0000000..3aebad7 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ms-MY/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.docxf b/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.docxf deleted file mode 100644 index 13da6d8..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pdf b/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pdf new file mode 100644 index 0000000..2a8e37f Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pptx b/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pptx index 4e6f5b0..573ff80 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pptx and b/onlyoffice_odoo/static/assets/document_templates/nl-NL/new.pptx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.docxf b/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.docxf deleted file mode 100644 index bc635f6..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.pdf b/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.pdf new file mode 100644 index 0000000..80e0d6b Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.xlsx index 6f55bb9..4c2a5a1 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/pl-PL/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.docxf b/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.docxf deleted file mode 100644 index 14497c0..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.pdf b/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.pdf new file mode 100644 index 0000000..4697fb1 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.xlsx index de6be65..935bbf2 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/pt-BR/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.docxf b/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.docxf deleted file mode 100644 index fca5018..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.pdf b/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.pdf new file mode 100644 index 0000000..b323955 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/pt-PT/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.docxf b/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.docxf deleted file mode 100644 index 03a1564..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.pdf b/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.pdf new file mode 100644 index 0000000..6afddad Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/ru-RU/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/si-LK/new.docxf b/onlyoffice_odoo/static/assets/document_templates/si-LK/new.docxf deleted file mode 100644 index db25691..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/si-LK/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/si-LK/new.pdf b/onlyoffice_odoo/static/assets/document_templates/si-LK/new.pdf new file mode 100644 index 0000000..f2cd305 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/si-LK/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.docxf b/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.docxf deleted file mode 100644 index 1ef3434..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.pdf b/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.pdf new file mode 100644 index 0000000..3674863 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.xlsx index ee981aa..4eb17a3 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/sk-SK/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.docx b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.docx new file mode 100644 index 0000000..2936d2f Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.docx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pdf b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pdf new file mode 100644 index 0000000..f653c6d Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pptx b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pptx new file mode 100644 index 0000000..2fc64b8 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.pptx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.xlsx new file mode 100644 index 0000000..9cb81ba Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Cyrl-RS/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.docx b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.docx new file mode 100644 index 0000000..66090f9 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.docx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pdf b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pdf new file mode 100644 index 0000000..635d5d8 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pptx b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pptx new file mode 100644 index 0000000..78da1c4 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.pptx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.xlsx new file mode 100644 index 0000000..3129540 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sr-Latn-RS/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.docxf b/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.docxf deleted file mode 100644 index 7746c6e..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.pdf b/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.pdf new file mode 100644 index 0000000..8071ea0 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.xlsx index a92dde8..699950c 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/sv-SE/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.docxf b/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.docxf deleted file mode 100644 index 11b0f23..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.pdf b/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.pdf new file mode 100644 index 0000000..555090b Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/tr-TR/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.docxf b/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.docxf deleted file mode 100644 index 202a70b..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.pdf b/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.pdf new file mode 100644 index 0000000..4eedc55 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.xlsx index 5912231..c1029c9 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/uk-UA/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.docxf b/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.docxf deleted file mode 100644 index bc7e932..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.pdf b/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.pdf new file mode 100644 index 0000000..126aaf4 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.xlsx index ec0a10d..33bad0f 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/vi-VN/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.docxf b/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.docxf deleted file mode 100644 index 125a298..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.pdf b/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.pdf new file mode 100644 index 0000000..f10cbd3 Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.pdf differ diff --git a/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.xlsx b/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.xlsx index fcdeda1..31892f4 100644 Binary files a/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.xlsx and b/onlyoffice_odoo/static/assets/document_templates/zh-CN/new.xlsx differ diff --git a/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.docxf b/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.docxf deleted file mode 100644 index 91eac9a..0000000 Binary files a/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.docxf and /dev/null differ diff --git a/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.pdf b/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.pdf new file mode 100644 index 0000000..c18403b Binary files /dev/null and b/onlyoffice_odoo/static/assets/document_templates/zh-TW/new.pdf differ diff --git a/onlyoffice_odoo/static/description/index.html b/onlyoffice_odoo/static/description/index.html index b4e3666..ddd88ca 100644 --- a/onlyoffice_odoo/static/description/index.html +++ b/onlyoffice_odoo/static/description/index.html @@ -59,7 +59,7 @@
Features and file formats
  • Edit text documents, spreadsheets, and presentations (DOCX, XLSX, PPTX)
  • Collaborate on documents with your colleagues in real time
  • -
  • Edit form templates in DOCXF
  • +
  • Edit form templates in PDF
  • Read PDF files
  • Open other office file formats for viewing, including RTF, TXT, CSV, etc.
  • diff --git a/onlyoffice_odoo/static/src/css/onlyoffice_link_container.png b/onlyoffice_odoo/static/src/css/onlyoffice_link_container.png new file mode 100644 index 0000000..372532c Binary files /dev/null and b/onlyoffice_odoo/static/src/css/onlyoffice_link_container.png differ diff --git a/onlyoffice_odoo/static/src/css/onlyoffice_link_container_mobile.png b/onlyoffice_odoo/static/src/css/onlyoffice_link_container_mobile.png new file mode 100644 index 0000000..8890981 Binary files /dev/null and b/onlyoffice_odoo/static/src/css/onlyoffice_link_container_mobile.png differ diff --git a/onlyoffice_odoo/static/src/css/res_config_settings_views.css b/onlyoffice_odoo/static/src/css/res_config_settings_views.css new file mode 100644 index 0000000..7541bdf --- /dev/null +++ b/onlyoffice_odoo/static/src/css/res_config_settings_views.css @@ -0,0 +1,44 @@ +.onlyoffice_link_container { + width: 549px; + height: 116px; + position: relative; + border-left: 0; + background-image: url("/onlyoffice_odoo/static/src/css/onlyoffice_link_container.png"); + background-size: contain; +} + +.onlyoffice_link_button { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + min-width: 93px; + max-width: 120px; + max-height: 40px; + padding: 5px 0; + background-color: #71639E; + color: white; + font-family: 'SF UI Display', sans-serif; + text-align: center; + font-weight: 500; + border-radius: 3px; + top: 40.5px; + right: 14px; +} + +@media (max-width: 767px) { + .onlyoffice_link_container { + width: 345px; + height: 169px; + background-image: url("/onlyoffice_odoo/static/src/css/onlyoffice_link_container_mobile.png"); + } + + .onlyoffice_link_button { + width: 77px; + height: 34px; + bottom: 16px; + left: 20px; + top: unset; + right: unset; + } +} \ No newline at end of file diff --git a/onlyoffice_odoo/static/src/models/attachment_card_onlyoffice.js b/onlyoffice_odoo/static/src/models/attachment_card_onlyoffice.js index 1e3c2c7..d95a039 100644 --- a/onlyoffice_odoo/static/src/models/attachment_card_onlyoffice.js +++ b/onlyoffice_odoo/static/src/models/attachment_card_onlyoffice.js @@ -8,18 +8,21 @@ import { AttachmentList } from "@mail/core/common/attachment_list"; import { patch } from "@web/core/utils/patch"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; const oo_editable_formats = [ "docx", - "docxf", "xlsx", "pptx", + "pdf", ] const oo_viewable_formats = [ "djvu", "doc", "docm", + "docxf", "dot", "dotm", "dotx", @@ -31,12 +34,10 @@ const oo_viewable_formats = [ "odt", "ott", "oxps", - "pdf", "rtf", "txt", "xps", "xml", - "oform", "csv", "fods", "ods", @@ -61,10 +62,38 @@ const oo_viewable_formats = [ ]; patch(AttachmentList.prototype, { + setup() { + super.setup(...arguments); + this.orm = useService("orm"); + this.notification = useService("notification"); + }, onlyofficeCanOpen(attachment) { return oo_editable_formats.includes(attachment.extension) || oo_viewable_formats.includes(attachment.extension); }, - openOnlyoffice(attachment) { + async openOnlyoffice(attachment) { + var demo = await this.orm.call("ir.config_parameter", "get_param", [ + "onlyoffice_connector.doc_server_demo", + ]); + var demoDate = await this.orm.call("ir.config_parameter", "get_param", [ + "onlyoffice_connector.doc_server_demo_date", + ]); + demoDate = new Date(Date.parse(demoDate)) + if (demo && demoDate && demoDate instanceof Date) { + const today = new Date(); + const difference = Math.floor((today - new Date(Date.parse(demoDate))) / (1000 * 60 * 60 * 24)); + if (difference > 30) { + this.notification.add( + _t( + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server" + ), + { + title: _t("ONLYOFFICE Docs server"), + type: 'warning', + } + ); + return; + } + } const accessTokenQuery = attachment.accessToken ? `?access_token=${attachment.accessToken}` : ''; window.open(`/onlyoffice/editor/${attachment.id}${accessTokenQuery}`, '_blank'); } diff --git a/onlyoffice_odoo/utils/config_constants.py b/onlyoffice_odoo/utils/config_constants.py index 331d379..4fbb9ed 100644 --- a/onlyoffice_odoo/utils/config_constants.py +++ b/onlyoffice_odoo/utils/config_constants.py @@ -3,7 +3,11 @@ # DOC_SERVER_PUBLIC_URL = "onlyoffice_connector.doc_server_public_url" +DOC_SERVER_ODOO_URL = "onlyoffice_connector.doc_server_odoo_url" +DOC_SERVER_INNER_URL = "onlyoffice_connector.doc_server_inner_url" DOC_SERVER_JWT_SECRET = "onlyoffice_connector.doc_server_jwt_secret" DOC_SERVER_JWT_HEADER = "onlyoffice_connector.doc_server_jwt_header" +DOC_SERVER_DEMO = "onlyoffice_connector.doc_server_demo" +DOC_SERVER_DEMO_DATE = "onlyoffice_connector.doc_server_demo_date" INTERNAL_JWT_SECRET = "onlyoffice_connector.internal_jwt_secret" \ No newline at end of file diff --git a/onlyoffice_odoo/utils/config_utils.py b/onlyoffice_odoo/utils/config_utils.py index d83c15c..af20f2c 100644 --- a/onlyoffice_odoo/utils/config_utils.py +++ b/onlyoffice_odoo/utils/config_utils.py @@ -3,17 +3,24 @@ # import uuid +from datetime import date from odoo.addons.onlyoffice_odoo.utils import config_constants -def get_odoo_url(env): - url = env["ir.config_parameter"].sudo().get_param("web.base.url") - return fix_url(url) +def get_base_or_odoo_url(env): + url = env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_ODOO_URL) + return fix_url(url or env["ir.config_parameter"].sudo().get_param("web.base.url")) def get_doc_server_public_url(env): url = env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_PUBLIC_URL) + if not url: + url = "http://documentserver/" return fix_url(url) +def get_doc_server_inner_url(env): + url = env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_INNER_URL) + return fix_url(url or get_doc_server_public_url(env)) + def get_jwt_header(env): header = env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_JWT_HEADER) if not header: @@ -31,19 +38,55 @@ def get_internal_jwt_secret(env): return secret +def get_demo(env): + return env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_DEMO) + +def get_demo_date(env): + return env["ir.config_parameter"].sudo().get_param(config_constants.DOC_SERVER_DEMO_DATE) + def set_doc_server_public_url(env, url): + if not url: + url = "http://documentserver/" env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_PUBLIC_URL, fix_url(url)) +def set_doc_server_odoo_url(env, url): + env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_ODOO_URL, fix_url(url)) + +def set_doc_server_inner_url(env, url): + env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_INNER_URL, fix_url(url)) + def set_jwt_header(env, header): env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_JWT_HEADER, header) def set_jwt_secret(env, secret): env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_JWT_SECRET, secret) +def set_demo(env, param): + demo = get_demo(env) + demo_date = get_demo_date(env) + if not demo_date: + set_demo_date(env) + if param: + set_doc_server_public_url(env, "https://onlinedocs.onlyoffice.com/") + set_doc_server_odoo_url(env, "") + set_doc_server_inner_url(env, "") + set_jwt_header(env, "AuthorizationJWT") + set_jwt_secret(env, "sn2puSUF7muF5Jas") + elif demo and not param: + set_doc_server_public_url(env, "http://documentserver/") + set_doc_server_odoo_url(env, "") + set_doc_server_inner_url(env, "") + set_jwt_header(env, "Authorization") + set_jwt_secret(env, "") + env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_DEMO, param) + +def set_demo_date(env): + demo_date = date.today() + env["ir.config_parameter"].sudo().set_param(config_constants.DOC_SERVER_DEMO_DATE, demo_date) + def fix_url(url): - if not url: - url = "http://documentserver/" - return fix_end_slash(fix_proto(url)) + if url: + return fix_end_slash(fix_proto(url)) def fix_proto(url): return url if url.startswith("http") else ("http://" + url) diff --git a/onlyoffice_odoo/utils/file_utils.py b/onlyoffice_odoo/utils/file_utils.py index 58e007d..fe7e7e1 100644 --- a/onlyoffice_odoo/utils/file_utils.py +++ b/onlyoffice_odoo/utils/file_utils.py @@ -61,7 +61,7 @@ def get_default_ext_by_type(str): if str == "slide": return "pptx" if str == "form": - return "docxf" + return "pdf" return None @@ -74,7 +74,7 @@ def get_default_name_by_type(str): if str == "slide": return "Presentation" if str == "form": - return "Form template" + return "PDF form" return None @@ -85,6 +85,8 @@ def get_mime_by_ext(str): return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" if str == "pptx": return "application/vnd.openxmlformats-officedocument.presentationml.presentation" + if str == "pdf": + return "application/pdf" return None diff --git a/onlyoffice_odoo/utils/format_utils.py b/onlyoffice_odoo/utils/format_utils.py index ebc38fb..99201fa 100644 --- a/onlyoffice_odoo/utils/format_utils.py +++ b/onlyoffice_odoo/utils/format_utils.py @@ -14,38 +14,39 @@ def __init__(self, name, type, edit=False, fill_form=False, convert_to=[]): def get_supported_formats(): return [ - Format("djvu", "word"), - Format("doc", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("docm", "word", convert_to=["docx", "docxf", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("djvu", "pdf"), + Format("doc", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("docm", "word", convert_to=["docx", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), Format( "docx", "word", True, - convert_to=["docxf", "oform", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"], + convert_to=["docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"], ), + Format("docxf", "pdf", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("dot", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("dotm", "word", convert_to=["docx", "docm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("dotx", "word", convert_to=["docx", "docm", "dotm", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("epub", "word", convert_to=["docx", "docm", "dotm", "dotx", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("fb2", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("fodt", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("html", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("mht", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("odt", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("ott", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "pdf", "pdfa", "rtf", "txt"]), + Format("oxps", "pdf", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), Format( - "docxf", - "word", + "pdf", + "pdf", True, - convert_to=["docx", "oform", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"], - ), - Format("dot", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("dotm", "word", convert_to=["docx", "docxf", "docm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("dotx", "word", convert_to=["docx", "docxf", "docm", "dotm", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("epub", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("fb2", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("fodt", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("html", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("mht", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("odt", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("ott", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "pdf", "pdfa", "rtf", "txt"]), - Format("oxps", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("pdf", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdfa", "rtf", "txt"]), - Format("rtf", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "txt"]), + convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdfa", "rtf", "txt"], + fill_form=True + ), + Format("rtf", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "txt"]), Format("txt", "word"), - Format("xps", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("xml", "word", convert_to=["docx", "docxf", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), - Format("oform", "word", fill_form=True), + Format("xps", "pdf", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("xml", "word", convert_to=["docx", "docm", "dotm", "dotx", "epub", "fb2", "html", "odt", "ott", "pdf", "pdfa", "rtf", "txt"]), + Format("oform", "pdf"), Format("csv", "cell"), Format("fods", "cell", convert_to=["xlsx", "csv", "ods", "ots", "pdf", "pdfa", "xlsm", "xltm", "xltx"]), Format("ods", "cell", convert_to=["xlsx", "csv", "ots", "pdf", "pdfa", "xlsm", "xltm", "xltx"]), diff --git a/onlyoffice_odoo/utils/url_utils.py b/onlyoffice_odoo/utils/url_utils.py new file mode 100644 index 0000000..10fea0d --- /dev/null +++ b/onlyoffice_odoo/utils/url_utils.py @@ -0,0 +1,9 @@ +from odoo.addons.onlyoffice_odoo.utils import config_utils + + +def replace_public_url_to_internal(env, url): + public_url = config_utils.get_doc_server_public_url(env) + inner_url = config_utils.get_doc_server_inner_url(env) + if inner_url: # add demo mode check + url = url.replace(public_url, inner_url) + return url \ No newline at end of file diff --git a/onlyoffice_odoo/utils/validation_utils.py b/onlyoffice_odoo/utils/validation_utils.py new file mode 100644 index 0000000..a7e8015 --- /dev/null +++ b/onlyoffice_odoo/utils/validation_utils.py @@ -0,0 +1,155 @@ +from odoo.addons.onlyoffice_odoo.utils import jwt_utils +from odoo.exceptions import ValidationError + +from urllib.request import urlopen +import json +import os +import re +import requests +import time + +def valid_url(url): + if not url: + return True + pattern = "^(https?:\/\/)?[\w-]{1,32}(\.[\w-]{1,32})*[\/\w-]*(:[\d]{1,5}\/?)?$" + if re.findall(pattern, url): + return True + return False + +def settings_validation(self): + base_url = self.env["ir.config_parameter"].get_param("web.base.url") + public_url = self.doc_server_public_url + jwt_secret = self.doc_server_jwt_secret + jwt_header = self.doc_server_jwt_header + demo = self.doc_server_demo + + check_mixed_content(base_url, public_url, demo) + check_doc_serv_url(public_url, demo) + check_doc_serv_command_service(self.env, public_url, jwt_secret, jwt_header, demo) + check_doc_serv_convert_service(self.env, public_url, base_url, jwt_secret, jwt_header, demo) + +def check_mixed_content(base_url, public_url, demo): + if (base_url.startswith("https") and not public_url.startswith("https")): + get_message_error("Mixed Active Content is not allowed. HTTPS address for Document Server is required.", demo) + +def check_doc_serv_url(public_url, demo): + try: + response = urlopen(os.path.join(public_url, "healthcheck")) + healthcheck = response.read() + + if not healthcheck: + get_message_error(os.path.join(public_url, "healthcheck") + " returned false.", demo) + + except ValidationError as e: + get_message_error(str(e), demo) + except Exception: + get_message_error("ONLYOFFICE cannot be reached", demo) + + +def check_doc_serv_command_service(env, url, jwt_secret, jwt_header, demo): + try: + headers = {"Content-Type": "application/json"} + body_json = {"c": "version"} + + if jwt_secret != None and jwt_secret != False and jwt_secret != "": + payload = {"payload": body_json} + + header_token = jwt_utils.encode_payload(env, payload, jwt_secret) + headers[jwt_header] = "Bearer " + header_token + + token = jwt_utils.encode_payload(env, body_json, jwt_secret) + body_json["token"] = token + + response = requests.post( + os.path.join(url, "coauthoring/CommandService.ashx"), + data=json.dumps(body_json), + headers=headers, + ) + + if response.json()["error"] == 6: + get_message_error("Authorization error", demo) + + if response.json()["error"] != 0: + get_message_error( + os.path.join(url, "coauthoring/CommandService.ashx") + + " returned error: " + + str(response.json()["error"]), demo + ) + + except ValidationError as e: + get_message_error(str(e), demo) + except Exception: + get_message_error("Error when trying to check CommandService", demo) + + +def check_doc_serv_convert_service(env, public_url, base_url, jwt_secret, jwt_header, demo): + file_url = os.path.join(base_url, "onlyoffice/file/content/test.txt") + + result = convert(env, file_url, public_url, jwt_secret, jwt_header) + + if isinstance(result, str): + return get_message_error(result, demo) + + +def convert(env, file_url, public_url, jwt_secret, jwt_header): + body_json = { + "key": int(time.time()), + "url": file_url, + "filetype": "txt", + "outputtype": "txt", + } + + headers = { + "Content-Type": "application/json", + "Accept": "application/json", + } + + if bool(jwt_secret): + payload = {"payload": body_json} + header_token = jwt_utils.encode_payload(env, payload, jwt_secret) + headers[jwt_header] = "Bearer " + header_token + token = jwt_utils.encode_payload(env, body_json, jwt_secret) + body_json["token"] = token + + try: + response = requests.post( + os.path.join(public_url, "ConvertService.ashx"), + data = json.dumps(body_json), + headers = headers + ) + + if response.status_code == 200: + response_json = response.json() + if "error" in response_json: + return get_conversion_error_message(response_json.get("error")) + else: + return f"Document conversion service returned status {response.status_code}" + + except: + return "Document conversion service cannot be reached" + + +def get_message_error(message, demo): + if demo: + raise ValidationError(f"Error connecting to demo server: {message}") + else: + raise ValidationError(message) + + +def get_conversion_error_message(errorCode): + errorDictionary = { + -1: "Unknown error", + -2: "Conversion timeout error", + -3: "Conversion error", + -4: "Error while downloading the document file to be converted", + -5: "Incorrect password", + -6: "Error while accessing the conversion result database", + -7: "Input error", + -8: "Invalid token", + } + + try: + return errorDictionary[errorCode] + + except: + return "Undefined error code" \ No newline at end of file diff --git a/onlyoffice_odoo/views/res_config_settings_views.xml b/onlyoffice_odoo/views/res_config_settings_views.xml index 501c929..ffd5ce3 100644 --- a/onlyoffice_odoo/views/res_config_settings_views.xml +++ b/onlyoffice_odoo/views/res_config_settings_views.xml @@ -12,20 +12,42 @@ + + + + + + + - + + + + +
    + This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period. +
    +
    + + + +
    diff --git a/onlyoffice_odoo_documents/__manifest__.py b/onlyoffice_odoo_documents/__manifest__.py index 24b5101..a11f58c 100644 --- a/onlyoffice_odoo_documents/__manifest__.py +++ b/onlyoffice_odoo_documents/__manifest__.py @@ -10,7 +10,7 @@ 'website': "https://www.onlyoffice.com", 'category': 'Productivity', - 'version': '2.1.0', + 'version': '4.0.1', 'depends': ['onlyoffice_odoo', 'documents'], diff --git a/onlyoffice_odoo_documents/i18n/de.po b/onlyoffice_odoo_documents/i18n/de.po index cd93fee..50006d3 100644 --- a/onlyoffice_odoo_documents/i18n/de.po +++ b/onlyoffice_odoo_documents/i18n/de.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-10-18 18:33+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:25+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "Neues Dokument" msgid "New document created in Documents" msgstr "Neues Dokument erstellt in Dokumente" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE Docs-Server" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "Präsentation" msgid "Spreadsheet" msgstr "Tabelle" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"Der 30-tägige Testzeitraum ist vorbei. Sie können sich nicht mehr mit dem " +"Demo-Server von ONLYOFFICE Docs verbinden" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/en.po b/onlyoffice_odoo_documents/i18n/en.po index b3737ab..337d031 100644 --- a/onlyoffice_odoo_documents/i18n/en.po +++ b/onlyoffice_odoo_documents/i18n/en.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0+e-20221116\n" +"Project-Id-Version: Odoo Server 16.0+e-20240603\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-10 10:23+0000\n" -"PO-Revision-Date: 2023-07-10 10:23+0000\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 08:20+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -66,6 +66,13 @@ msgstr "" msgid "New document created in Documents" msgstr "" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,15 @@ msgstr "" msgid "Spreadsheet" msgstr "" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE" +" Docs server" +msgstr "" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/es.po b/onlyoffice_odoo_documents/i18n/es.po index ececeed..12d561b 100644 --- a/onlyoffice_odoo_documents/i18n/es.po +++ b/onlyoffice_odoo_documents/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:12+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:26+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: es_ES\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "Nuevo documento" msgid "New document created in Documents" msgstr "Nuevo documento creado en Documentos" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Servidor de ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "Presentación" msgid "Spreadsheet" msgstr "Hoja de cálculo" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"El período de prueba de 30 días ha terminado, ya no se puede conectar al " +"servidor de ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/fr.po b/onlyoffice_odoo_documents/i18n/fr.po index 923661d..3478799 100644 --- a/onlyoffice_odoo_documents/i18n/fr.po +++ b/onlyoffice_odoo_documents/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:07+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:26+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "Nouveau document" msgid "New document created in Documents" msgstr "Nouveau document créé dans Documents" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Serveur ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "Présentation" msgid "Spreadsheet" msgstr "Feuille de calcul" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"La période de test de 30 jours est terminée, vous ne pouvez plus vous " +"connecter à la démo ONLYOFFICE Serveur Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/it.po b/onlyoffice_odoo_documents/i18n/it.po index 242f3d1..e17ca78 100644 --- a/onlyoffice_odoo_documents/i18n/it.po +++ b/onlyoffice_odoo_documents/i18n/it.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:12+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:27+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: it_IT\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "Nuovo documento" msgid "New document created in Documents" msgstr "Nuovo documento è stato creato in Documenti" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Server ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "Presentazione" msgid "Spreadsheet" msgstr "Foglio di calcolo" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"Il periodo di prova di 30 giorni è terminato, non puoi più connetterti alla " +"demo ONLYOFFICE Docs Server" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/ja.po b/onlyoffice_odoo_documents/i18n/ja.po index 422d513..cad206e 100644 --- a/onlyoffice_odoo_documents/i18n/ja.po +++ b/onlyoffice_odoo_documents/i18n/ja.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 16:13+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:28+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: ja_JP\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "新規ドキュメント" msgid "New document created in Documents" msgstr "「文書」に新規文書が作成されました" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE Docsサーバ" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "プレゼンテーション" msgid "Spreadsheet" msgstr "スプレッドシート" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"30日間のテスト期間が終了し、ONLYOFFICE Docsのデモサーバーに接続できなくなりま" +"した" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/pt_BR.po b/onlyoffice_odoo_documents/i18n/pt_BR.po index 60648e5..6590ae7 100644 --- a/onlyoffice_odoo_documents/i18n/pt_BR.po +++ b/onlyoffice_odoo_documents/i18n/pt_BR.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:05+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:29+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: pt_BR\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "Novo Documento" msgid "New document created in Documents" msgstr "Novo documento criado em Documentos" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Servidor ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,17 @@ msgstr "Apresentação" msgid "Spreadsheet" msgstr "Planilha" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"O período de teste de 30 dias acabou, você não pode mais se conectar ao " +"ONLYOFFICE de demonstração Servidor Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/ru.po b/onlyoffice_odoo_documents/i18n/ru.po index 475fe46..87507de 100644 --- a/onlyoffice_odoo_documents/i18n/ru.po +++ b/onlyoffice_odoo_documents/i18n/ru.po @@ -6,16 +6,17 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:11+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:29+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: ru_RU\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Poedit 3.3.1\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +68,13 @@ msgstr "Новый документ" msgid "New document created in Documents" msgstr "Новый документ создан в Документах" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "Сервер ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +96,17 @@ msgstr "Презентация" msgid "Spreadsheet" msgstr "Таблица" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "" +"30-дневный тестовый период закончился, вы больше не можете подключиться к " +"демо-серверу ONLYOFFICE Docs" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/i18n/zh_CN.po b/onlyoffice_odoo_documents/i18n/zh_CN.po index 23aabc7..3054ecf 100644 --- a/onlyoffice_odoo_documents/i18n/zh_CN.po +++ b/onlyoffice_odoo_documents/i18n/zh_CN.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0-20221116\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-14 10:14+0000\n" -"PO-Revision-Date: 2023-07-10 17:11+0300\n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:30+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: zh_CN\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3.1\n" +"X-Generator: Poedit 3.4.4\n" #. module: onlyoffice_odoo_documents #. odoo-javascript @@ -67,6 +67,13 @@ msgstr "新建文档" msgid "New document created in Documents" msgstr "在“文档”中新建的文档" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "ONLYOFFICE Docs server" +msgstr "ONLYOFFICE 文档服务器" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/components/documents_inspector_onlyoffice/documents_inspector_onlyoffice.xml:0 @@ -88,6 +95,15 @@ msgstr "演示文稿" msgid "Spreadsheet" msgstr "电子表格" +#. module: onlyoffice_odoo_documents +#. odoo-javascript +#: code:addons/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js:0 +#, python-format +msgid "" +"The 30-day test period is over, you can no longer connect to demo ONLYOFFICE " +"Docs server" +msgstr "30 天测试期结束后,您将无法再访问 ONLYOFFICE文档服务器演示版" + #. module: onlyoffice_odoo_documents #. odoo-javascript #: code:addons/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/create_dialog.xml:0 diff --git a/onlyoffice_odoo_documents/static/description/index.html b/onlyoffice_odoo_documents/static/description/index.html index 4cac60c..cfc29fe 100644 --- a/onlyoffice_odoo_documents/static/description/index.html +++ b/onlyoffice_odoo_documents/static/description/index.html @@ -80,7 +80,7 @@
    App features and file formats
    • Edit text documents, spreadsheets, and presentations (DOCX, XLSX, PPTX)
    • Collaborate on documents with your colleagues in real time
    • -
    • Edit form templates in DOCXF
    • +
    • Edit form templates in PDF
    • Read PDF files
    • Open other office file formats for viewing, including RTF, TXT, CSV, etc.
    • diff --git a/onlyoffice_odoo_documents/static/src/documents_view/onlyoffice_odoo_documents_controller_mixin.js b/onlyoffice_odoo_documents/static/src/documents_view/onlyoffice_odoo_documents_controller_mixin.js index c630b08..0d9cde9 100644 --- a/onlyoffice_odoo_documents/static/src/documents_view/onlyoffice_odoo_documents_controller_mixin.js +++ b/onlyoffice_odoo_documents/static/src/documents_view/onlyoffice_odoo_documents_controller_mixin.js @@ -15,6 +15,7 @@ export const OnlyofficeDocumentsControllerMixin = () => ({ this.dialogService.add(CreateDialog, { folderId: this.env.searchModel.getSelectedFolderId(), context: this.props.context, + model: this.env.model }); }, }); diff --git a/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js b/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js index 3c8dc13..75fbc59 100644 --- a/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js +++ b/onlyoffice_odoo_documents/static/src/models/documents_inspector_onlyoffice.js @@ -8,18 +8,21 @@ import { patch } from "@web/core/utils/patch"; import { DocumentsInspector } from '@documents/views/inspector/documents_inspector'; +import { useService } from "@web/core/utils/hooks"; +import { _t } from "@web/core/l10n/translation"; const oo_editable_formats = [ "docx", - "docxf", "xlsx", "pptx", + "pdf", ] const oo_viewable_formats = [ "djvu", "doc", "docm", + "docxf", "dot", "dotm", "dotx", @@ -31,12 +34,10 @@ const oo_viewable_formats = [ "odt", "ott", "oxps", - "pdf", "rtf", "txt", "xps", "xml", - "oform", "csv", "fods", "ods", @@ -61,6 +62,11 @@ const oo_viewable_formats = [ ]; patch(DocumentsInspector.prototype, { + setup() { + super.setup(...arguments); + this.notification = useService("notification"); + this.onlyofficeEditorUrl = this.onlyofficeEditorUrl.bind(this); + }, showOnlyofficeButton(records) { if (records.length !== 1) return false; const ext = records[0].data.display_name.split('.').pop() @@ -73,7 +79,26 @@ patch(DocumentsInspector.prototype, { onlyofficeCanView(extension) { return oo_viewable_formats.includes(extension); }, - onlyofficeEditorUrl(id) { + async onlyofficeEditorUrl(id) { + var demo = await this.env.services.orm.call('ir.config_parameter', 'get_param', ['onlyoffice_connector.doc_server_demo']); + var demoDate = await this.env.services.orm.call('ir.config_parameter', 'get_param', ['onlyoffice_connector.doc_server_demo_date']); + demoDate = new Date(Date.parse(demoDate)) + if (demo && demoDate && demoDate instanceof Date) { + const today = new Date(); + const difference = Math.floor((today - new Date(Date.parse(demoDate))) / (1000 * 60 * 60 * 24)); + if (difference > 30) { + this.notification.add( + _t( + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server" + ), + { + title: _t("ONLYOFFICE Docs server"), + type: 'warning', + } + ); + return; + } + } window.open(`/onlyoffice/editor/document/${id}`, '_blank'); } }); \ No newline at end of file diff --git a/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/onlyoffice_create_template_dialog.js b/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/onlyoffice_create_template_dialog.js index cd548b1..d54db99 100644 --- a/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/onlyoffice_create_template_dialog.js +++ b/onlyoffice_odoo_documents/static/src/onlyoffice_create_template/onlyoffice_create_template_dialog.js @@ -50,6 +50,9 @@ export class CreateDialog extends Component { const result = JSON.parse(json); + this.props.model.load(); + this.props.model.notify(); + if (result.error) { this.notificationService.add(result.error, { type: "error", diff --git a/onlyoffice_odoo_templates/__init__.py b/onlyoffice_odoo_templates/__init__.py new file mode 100644 index 0000000..511a0ca --- /dev/null +++ b/onlyoffice_odoo_templates/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import controllers +from . import models \ No newline at end of file diff --git a/onlyoffice_odoo_templates/__manifest__.py b/onlyoffice_odoo_templates/__manifest__.py new file mode 100644 index 0000000..f6949c3 --- /dev/null +++ b/onlyoffice_odoo_templates/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +{ + 'name': "ONLYOFFICE Templates", + + 'summary': "Automate form creation with inserting fields from Odoo in templates.", + + 'description': "Work with fillable templates in Odoo using ONLYOFFICE. Create templates based on the data and fields available in Odoo, fill them out and print with several clicks.", + + 'author': "ONLYOFFICE", + 'website': "https://www.onlyoffice.com", + + 'category': 'Productivity', + 'version': '2.0.2', + + 'depends': ['base', 'onlyoffice_odoo'], + + "external_dependencies": {"python": ["pyjwt"]}, + + # always loaded + 'data': [ + 'security/onlyoffice_templates_security.xml', + 'security/ir.model.access.csv', + 'views/onlyoffice_menu_views.xml' + ], + + 'demo': ['data/templates_data.xml'], + + 'license': 'LGPL-3', + 'support': 'support@onlyoffice.com', + + 'images': [ "static/description/main_screenshot.png", "static/description/create_templates.png", "static/description/edit_templates.png", "static/description/access_rights.png", "static/description/work_with_templates.png" ], + + 'installable': True, + 'application': True, + + 'assets': { + 'web.assets_backend': [ + 'onlyoffice_odoo_templates/static/src/css/*', + 'onlyoffice_odoo_templates/static/src/views/**/*', + ], + }, +} diff --git a/onlyoffice_odoo_templates/controllers/__init__.py b/onlyoffice_odoo_templates/controllers/__init__.py new file mode 100644 index 0000000..457bae2 --- /dev/null +++ b/onlyoffice_odoo_templates/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/onlyoffice_odoo_templates/controllers/controllers.py b/onlyoffice_odoo_templates/controllers/controllers.py new file mode 100644 index 0000000..be4bcf4 --- /dev/null +++ b/onlyoffice_odoo_templates/controllers/controllers.py @@ -0,0 +1,335 @@ +# -*- coding: utf-8 -*- + +# +# (c) Copyright Ascensio System SIA 2024 +# +import base64 +import codecs +import json +import re +import requests +from urllib.request import urlopen + +from odoo import SUPERUSER_ID, http, models +from odoo.http import request +from odoo.tools import BytesIO, file_open, translate, get_lang, DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT +from odoo.addons.onlyoffice_odoo.controllers.controllers import Onlyoffice_Connector +from odoo.addons.onlyoffice_odoo.utils import config_utils, file_utils, jwt_utils + +class Onlyoffice_Inherited_Connector(Onlyoffice_Connector): + @http.route("/onlyoffice/template/editor", auth="user", methods=["POST"], type="json", csrf=False) + def override_render_editor(self, attachment_id, access_token=None): + attachment = self.get_attachment(attachment_id) + if not attachment: + return request.not_found() + + attachment.validate_access(access_token) + + data = attachment.read(["id", "checksum", "public", "name", "access_token"])[0] + filename = data["name"] + + can_read = attachment.check_access_rights("read", raise_exception=False) and file_utils.can_view(filename) + hasAccess = http.request.env.user.has_group("onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin") + can_write = hasAccess and attachment.check_access_rights("write", raise_exception=False) and file_utils.can_edit(filename) + + if not can_read: + raise Exception("cant read") + + prepare_editor_values = self.prepare_editor_values(attachment, access_token, can_write) + return prepare_editor_values + + +class OnlyofficeTemplate_Connector(http.Controller): + @http.route("/onlyoffice/template/get_filled_template", auth="user", methods=["POST"], type="json") + def get_filled_template(self, template_id, record_id, model_name): + jwt_secret = config_utils.get_jwt_secret(request.env) + jwt_header = config_utils.get_jwt_header(request.env) + odoo_url = config_utils.get_base_or_odoo_url(request.env) + docserver_url = config_utils.get_doc_server_public_url(request.env) + docbuilder_url = f"{docserver_url}docbuilder" + internal_jwt_secret = config_utils.get_internal_jwt_secret(request.env) + oo_security_token = jwt_utils.encode_payload(request.env, {"id": request.env.user.id}, internal_jwt_secret) + + template_headers = {"Content-Type": "application/json", "Accept": "application/json"} + template_callback_url = f"{odoo_url}onlyoffice/template/callback/fill_template?template_id={template_id}&record_id={record_id}&model_name={model_name}&oo_security_token={oo_security_token}" + template_payload = {"async": False, "url": template_callback_url} + + if jwt_secret: + template_payload["token"] = jwt_utils.encode_payload(request.env, template_payload, jwt_secret) + template_headers[jwt_header] = "Bearer " + jwt_utils.encode_payload(request.env, {"payload": template_payload}, jwt_secret) + + try: + response = requests.post(docbuilder_url, json=template_payload, headers=template_headers) + response.raise_for_status() + response_json = response.json() + + if response_json.get("error"): + return {"error": self.get_docbuilder_error(response_json.get("error"))} + + urls = response_json.get("urls") + if urls: + first_url = next(iter(urls.values()), None) + if first_url: + return {"href": first_url} + + except requests.RequestException as e: + return {"error": e} + + return {"error": "Unknown error"} + + @http.route("/onlyoffice/template/callback/fill_template", auth="public") + def fill_template(self, template_id, record_id, model_name, oo_security_token): + user = self.get_user_from_token(oo_security_token) + if not user: + return + + template_record = self.get_record(template_id, "onlyoffice.odoo.templates", self.get_user_from_token(oo_security_token)) + if not template_record: + print("Template not found") + return + attachment_id = template_record.attachment_id.id + + jwt_secret = config_utils.get_jwt_secret(request.env) + jwt_header = config_utils.get_jwt_header(request.env) + odoo_url = config_utils.get_base_or_odoo_url(request.env) + docserver_url = config_utils.get_doc_server_public_url(request.env) + docbuilder_url = f"{docserver_url}docbuilder" + + keys_headers = {"Content-Type": "application/json", "Accept": "application/json"} + keys_callback_url = f"{odoo_url}onlyoffice/template/callback/get_keys?attachment_id={attachment_id}&oo_security_token={oo_security_token}" + keys_payload = {"async": False, "url": keys_callback_url} + + if jwt_secret: + keys_payload["token"] = jwt_utils.encode_payload(request.env, keys_payload, jwt_secret) + keys_headers[jwt_header] = "Bearer " + jwt_utils.encode_payload(request.env, {"payload": keys_payload}, jwt_secret) + + try: + response = requests.post(docbuilder_url, json=keys_payload, headers=keys_headers) + response.raise_for_status() + response_json = response.json() + + if response_json.get("error"): + print(response_json.get("error")) + return + + urls = response_json.get("urls") + if urls: + first_url = next(iter(urls.values()), None) + if first_url: + response = requests.get(first_url) + response.raise_for_status() + + response_content = codecs.decode(response.content, 'utf-8-sig') + keys = sorted(json.loads(response_content)) + + except requests.RequestException as e: + print(e) # TODO + return + + try: + fields = self.get_fields(model_name, record_id, keys, user) + fields_json = json.dumps(fields, ensure_ascii=False) + except Exception as e: + print(e) # TODO + fields_json = "" + + url = f"{config_utils.get_base_or_odoo_url(http.request.env)}onlyoffice/template/download/{attachment_id}?oo_security_token={oo_security_token}" + docbuilder_content = f""" + builder.OpenFile("{url}"); + var fields = {fields_json}; + """ + + with file_open("onlyoffice_odoo_templates/controllers/fill_template.docbuilder", "r") as f: + docbuilder_content = docbuilder_content + f.read() + + record = self.get_record(record_id, model_name, user) + record_name = getattr(record, "display_name", getattr(record, "name", str(record_id))) + template_name = getattr(template_record, "display_name", getattr(template_record, "name", "Filled Template")) + filename = re.sub(r"[<>:'/\\|?*\x00-\x1f]", " ", f"{template_name} - {record_name}") + + docbuilder_content += f""" + builder.SaveFile("pdf", "{filename}.pdf"); + builder.CloseFile(); + """ + + headers = { + "Content-Disposition": "attachment; filename='fill_template.docbuilder'", + "Content-Type": "text/plain", + } + + return request.make_response(docbuilder_content, headers) + + @http.route("/onlyoffice/template/callback/get_keys", auth="public") + def get_keys(self, attachment_id, oo_security_token): + url = f"{config_utils.get_base_or_odoo_url(http.request.env)}onlyoffice/template/download/{attachment_id}?oo_security_token={oo_security_token}" + docbuilder_content = f""" + builder.OpenFile("{url}"); + """ + + with file_open("onlyoffice_odoo_templates/controllers/get_keys.docbuilder", "r") as f: + docbuilder_content = docbuilder_content + f.read() + + headers = { + "Content-Disposition": "attachment; filename='get_keys.docbuilder'", + "Content-Type": "text/plain", + } + + return request.make_response(docbuilder_content, headers) + + @http.route("/onlyoffice/template/download/", auth="public") + def download_template(self, attachment_id, oo_security_token=None): + if request.env.user and request.env.user.id and not oo_security_token: + internal_jwt_secret = config_utils.get_internal_jwt_secret(request.env) + oo_security_token = jwt_utils.encode_payload(request.env, {"id": request.env.user.id}, internal_jwt_secret) + + attachment = self.get_record(attachment_id, "ir.attachment", self.get_user_from_token(oo_security_token)) + + attachment_name = getattr(attachment, "display_name", getattr(attachment, "name", f"Template - {attachment_id}.pdf")) + + if attachment: + template_content = base64.b64decode(attachment.datas) + headers = { + "Content-Type": file_utils.get_mime_by_ext("pdf"), + "Content-Disposition": f"attachment; filename={attachment_name}", + } + return request.make_response(template_content, headers) + else: + return request.not_found() + + def get_fields(self, model_name, record_id, keys, user): + def convert_keys(input_list): + output_dict = {} + for item in input_list: + if " " in item: + keys = item.split(" ") + current_dict = output_dict + for key in keys[:-1]: + current_dict = current_dict.setdefault(key, {}) + current_dict[keys[-1]] = None + else: + output_dict[item] = None + + def dict_to_list(input_dict): + output_list = [] + for key, value in input_dict.items(): + if isinstance(value, dict): + output_list.append({key: dict_to_list(value)}) + else: + output_list.append(key) + return output_list + + return dict_to_list(output_dict) + + def get_related_field(model_name, record_id, keys): + result = {} + record = self.get_record(record_id, model_name, user) + if not record: + print("Record not found") + return + for field in keys: + try: + if isinstance(field, dict): + related_field = list(field.keys())[0] + if related_field not in record._fields: + continue + field_type = record._fields[related_field].type + related_keys = field[related_field] + if field_type in ["one2many", "many2many", "many2one"]: + related_model = record._fields[related_field].comodel_name + related_record_ids = record.read([related_field])[0][related_field] + if not related_record_ids: + continue + if field_type == "many2one" and isinstance(related_record_ids, tuple): + related_data = get_related_field(related_model, related_record_ids[0], related_keys) + else: + related_data = [] + for record_id in related_record_ids: + related_data_temp = get_related_field(related_model, record_id, related_keys) + if related_data_temp: + related_data.append(related_data_temp) + if related_data: + result[related_field] = related_data + else: + if field not in record._fields: + continue + field_type = record._fields[field].type + data = record.read([field])[0][field] + if field_type in ["html", "json"]: + continue # TODO + elif field_type == "boolean": + result[field] = str(data).lower() + elif isinstance(data, tuple): + result[field] = str(data[1]) + elif field_type == "binary" and isinstance(data, bytes): + img = re.search(r"'(.*?)'", str(data)) + if img: + result[field] = img.group(1) + elif data: + if field_type in ["float", "integer", "char", "text"]: + result[field] = str(data) + elif field_type == "monetary": + data = "{:,.2f}".format(float(data)) + currency_field_name = record._fields[field].currency_field + if currency_field_name: + currency = getattr(record, currency_field_name).name + result[field] = f"{data} {currency}" if currency else str(data) + else: + result[field] = str(data) + elif field_type == "date": + date_format = get_lang(request.env).date_format + format_to_use = date_format or DEFAULT_SERVER_DATE_FORMAT + result[field] = str(data.strftime(format_to_use)) + elif field_type == "datetime": + date_format = get_lang(request.env).date_format + time_format = get_lang(request.env).time_format + if date_format and time_format: + format_to_use = f"{date_format} {time_format}" + else: + format_to_use = DEFAULT_SERVER_DATETIME_FORMAT + result[field] = str(data.strftime(format_to_use)) + elif field_type == "selection": + selection = record._fields[field].selection + if isinstance(selection, list): + result[field] = str(dict(selection).get(data)) + else: + result[field] = str(data) + except Exception as e: + print(e) # TODO + continue + return result + + keys = convert_keys(keys) + return get_related_field(model_name, record_id, keys) + + def get_record(self, record_id, model_name, user=None): + if not isinstance(record_id, list): + record_id = [int(record_id)] + model_name = request.env[model_name].sudo() + context = {"lang": request.env.context.get("lang", "en_US")} + if user: + model_name = model_name.with_user(user) + context["lang"] = user.lang + context["uid"] = user.id + try: + return model_name.with_context(context).browse(record_id).exists() # TODO: Add .sudo() + except Exception as e: + print(e) + return None + + def get_user_from_token(self, token): + if not token: + raise Exception("missing security token") + user_id = jwt_utils.decode_token(request.env, token, config_utils.get_internal_jwt_secret(request.env))["id"] + user = request.env["res.users"].sudo().browse(user_id).exists().ensure_one() + return user + + def get_docbuilder_error(self, error_code): + docbuilder_messages = { + -1: "Unknown error.", + -2: "Generation timeout error.", + -3: "Document generation error.", + -4: "Error while downloading the document file to be generated.", + -6: "Error while accessing the document generation result database.", + -8: "Invalid token." + } + return docbuilder_messages.get(error_code, "Error code not recognized.") \ No newline at end of file diff --git a/onlyoffice_odoo_templates/controllers/fill_template.docbuilder b/onlyoffice_odoo_templates/controllers/fill_template.docbuilder new file mode 100644 index 0000000..d51179b --- /dev/null +++ b/onlyoffice_odoo_templates/controllers/fill_template.docbuilder @@ -0,0 +1,302 @@ +var oDocument = Api.GetDocument(); +// As new elements appear when filling tables and lists, the total number of elements in the document increases, +// so we need to store references to elements, or increase the loop counter when traversing document elements. +var oDocumentElementsCount = oDocument.GetElementsCount(); +var oDocumentElements = []; +for (var i = 0; i < oDocumentElementsCount; i++) { + var oElement = oDocument.GetElement(i); + oDocumentElements.push(oElement); +} +oDocumentElements.forEach(oElement => { + fillElementByType(oElement); +}) + + +function getData(keyPath, index = 0, obj = fields) { + const keys = keyPath.split(' '); + + // Recursive function to traverse the object and get the desired value(s) + function traverse(obj, keys) { + if (keys.length === 0) return obj; + + let key = keys[0]; + let remainingKeys = keys.slice(1); + + if (Array.isArray(obj)) { + return obj.map(item => traverse(item, [key, ...remainingKeys])); + } else { + if (typeof obj[key] === 'undefined') { + return "" + } + return traverse(obj[key], remainingKeys); + } + } + + // Get the value(s) from the object based on the keys + let values = traverse(obj, keys); + + if (typeof values[index] === 'undefined') { + return "" + } + + if (Array.isArray(values[0])) { + // If the first element is an array, return a concatenated string of all values by key + return values[index].flat().join(' '); + } else if (Array.isArray(values) && typeof values[index] !== 'object') { + // If values are an array, return the value at the specified index + return values[index]; + } else { + // If the value is not an array, return it as is + return values; + } +} + +function getDataArrayLength(keyPath, obj = fields) { + const keys = keyPath.split(' '); + let currentObj = obj; + for (let key of keys) { + if (typeof currentObj === 'undefined') { + return 0; + } + if (Array.isArray(currentObj)) { + return currentObj.length; + } + currentObj = currentObj[key]; + } + return 0; +} + +function fillElementByType(oElement) { + var oElementClassType = oElement.GetClassType(); + + if (oElementClassType === "paragraph") { + if (oElement.GetNumbering()) { + fillNumbering(oElement); + } else { + fillParagraph(oElement); + } + } + if (oElementClassType === "form") { + fillForm(oElement); + } + if (oElementClassType === "run") {} + if (oElementClassType === "table") { + fillTable(oElement); + } +} + +function fillParagraph(oParagraph) { + var oParagraphElementsCount = oParagraph.GetElementsCount(); + for (var i = 0; i < oParagraphElementsCount; i++) { + var oElement = oParagraph.GetElement(i); + fillElementByType(oElement); + } +} + +function fillNumbering(oParagraph) { + var requiredLevel = 0; + + var oParagraphElementsCount = oParagraph.GetElementsCount(); + for (var i = 0; i < oParagraphElementsCount; i++) { + var oElement = oParagraph.GetElement(i); + var oElementClassType = oElement.GetClassType(); + + if (oElementClassType === "form") { + var oForm = oElement; + var oFormKey = oForm.GetFormKey(); + + var data = getData(oFormKey, 0); + var length = getDataArrayLength(oFormKey) + requiredLevel = Math.max(requiredLevel, length); + fillForm(oForm, data); + } + } + + if (requiredLevel > 1) { + var oNumberingLevel = oParagraph.GetNumbering(); + var oCurrentParagraph = oParagraph; + for (var newLevel = 1; newLevel < requiredLevel; newLevel++) { + var nPos = oCurrentParagraph.GetPosInParent(); + + var oNewParagraph = oParagraph.Copy(); + oNewParagraph.SetNumbering(oNumberingLevel); + + var oParagraphElementsCount = oNewParagraph.GetElementsCount(); + for (var element = 0; element < oParagraphElementsCount; element++) { + var oElement = oNewParagraph.GetElement(element); + var oElementClassType = oElement.GetClassType(); + + if (oElementClassType === "form") { + var oForm = oElement; + var oFormKey = oForm.GetFormKey(); + + oForm.SetFormKey(oFormKey + newLevel); + var data = getData(oFormKey, newLevel); + fillForm(oForm, data); + } + } + oDocument.AddElement(nPos + 1, oNewParagraph); + oCurrentParagraph = oNewParagraph; + } + } +} + + +function fillTable(oTable) { + var rows = oTable.GetRowsCount(); + for (var row = 0; row < rows; row++) { + var oRow = oTable.GetRow(row); + var cols = oRow.GetCellsCount(); + + // If there is a form in the cell, then write the length of the array using the form key. + // Maximum length - the number of lines that must be inserted after the current row. + var requiredRows = 0; + var tableData = {}; + + for (var col = 0; col < cols; col++) { + var oCell = oTable.GetCell(row, col); + var oCellContent = oCell.GetContent(); + + // Enum of paragraphs inside the cell + var oCellElementsCount = oCellContent.GetElementsCount(); + for (var cellElement = 0; cellElement < oCellElementsCount; cellElement++) { + var oCellElement = oCellContent.GetElement(cellElement); + + if (oCellElement.GetClassType() !== "paragraph") { + fillElementByType(oCellElement) + } else { + // Enum paragraph elements inside a cell + var oParagraphElementsCount = oCellElement.GetElementsCount(); + for (var paragraphElement = 0; paragraphElement < oParagraphElementsCount; paragraphElement++) { + var oParagraphElement = oCellElement.GetElement(paragraphElement); + + if (oParagraphElement.GetClassType() !== "form") { + fillElementByType(oParagraphElement) + } else { + // Fill the first element and count the number of required rows + var oForm = oParagraphElement; + var oFormKey = oForm.GetFormKey(); + + var data = getData(oFormKey, 0); + var length = getDataArrayLength(oFormKey) + requiredRows = Math.max(requiredRows, length); + fillForm(oForm, data); + } + } + } + } + } + + if (requiredRows > 1) { + // Add new rows, the first row is already there and filled + // In each cell of the column we copy the previous cell to save the structure. + oTable.AddRows(oTable.GetCell(row, 0), requiredRows - 1, false); + for (var newRow = 1; newRow < requiredRows; newRow++) { + for (var col = 0; col < cols; col++) { + var oNewCell = oTable.GetCell(row + newRow, col); + var oCell = oTable.GetCell(row, col); + var oCellContent = oCell.GetContent(); + + var oCellElementsCount = oCellContent.GetElementsCount(); + for (var i = 0; i < oCellElementsCount; i++) { + // Get the contents of the cell for further copying to a new cell + var oCellElement = oCellContent.GetElement(i); + // Copy the contents of a cell to paste into a new cell + var oNewCellElement = oCellElement.Copy(); + // If this is not a paragraph, paste into a new cell unchanged + if (oCellElement.GetClassType() !== "paragraph") { + oNewCell.AddElement(i, oNewCellElement); + } else { + // If it is a paragraph, process the elements of the paragraph to fill the forms inside + var oParagraphElementsCount = oNewCellElement.GetElementsCount(); + for (var paragraphElement = 0; paragraphElement < oParagraphElementsCount; paragraphElement++) { + var oNewParagraphElement = oNewCellElement.GetElement(paragraphElement); + if (oNewParagraphElement.GetClassType() === "form") { + var oForm = oNewParagraphElement; + var oFormKey = oForm.GetFormKey(); + + var data = getData(oFormKey, newRow); + fillForm(oForm, data); + } + } + oNewCell.AddElement(i, oNewCellElement); + } + } + // After creating a new cell, there is an empty paragraph inside. Remove it + var oNewCellContent = oNewCell.GetContent(); + var oNewCellElementsCount = oNewCellContent.GetElementsCount(); + oNewCellContent.RemoveElement(oNewCellElementsCount - 1); + } + } + rows += requiredRows - 1; + row += requiredRows - 1; + } + } +} + +// In odoo, if there is no data in the field, the value will be false +function fillForm(oForm, data = null) { + var oFormFormType = oForm.GetFormType(); + + if (oFormFormType === "textForm") { + function fillTextForm (data) { + data = String(data); + if (data === "false" || data === "undefined") { + oForm.SetText(" "); + } else { + oForm.SetText(data); + } + } + + if (data === null) { + var oFormKey = oForm.GetFormKey(); + data = getData(oFormKey); + fillTextForm(data); + } else { + fillTextForm(data); + } + } + + if (oFormFormType === "comboBoxForm") {} + + if (oFormFormType === "dropDownForm") {} + + if (oFormFormType === "checkBoxForm") { + function fillCheckBoxForm (data) { + try { + data = JSON.parse(data); + oForm.SetChecked(data); + } catch (_e) { + // TODO: set checked BoxForm in case of error + } + } + + if (data === null) { + var oFormKey = oForm.GetFormKey() + var data = getData(oFormKey); + fillCheckBoxForm(data); + } else { + fillCheckBoxForm(data); + } + } + + if (oFormFormType === "radioButtonForm") {} + + if (oFormFormType === "pictureForm") { + function fillPictureForm (data) { + if (typeof data === 'string') { + oForm.SetImage(`data:image/png;base64, ${data}`); + } + } + + if (data === null) { + var oFormKey = oForm.GetFormKey(); + data = getData(oFormKey); + fillPictureForm(data); + } else { + fillPictureForm(data); + } + } +} + +Api.Save(); \ No newline at end of file diff --git a/onlyoffice_odoo_templates/controllers/get_keys.docbuilder b/onlyoffice_odoo_templates/controllers/get_keys.docbuilder new file mode 100644 index 0000000..29e8de0 --- /dev/null +++ b/onlyoffice_odoo_templates/controllers/get_keys.docbuilder @@ -0,0 +1,19 @@ +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(); \ No newline at end of file diff --git a/onlyoffice_odoo_templates/data/templates/account.move/Invoices.pdf b/onlyoffice_odoo_templates/data/templates/account.move/Invoices.pdf new file mode 100644 index 0000000..92e3a6d Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/account.move/Invoices.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/calendar.event/Memo.pdf b/onlyoffice_odoo_templates/data/templates/calendar.event/Memo.pdf new file mode 100644 index 0000000..f2cb11d Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/calendar.event/Memo.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/hr.applicant/CV Templates.pdf b/onlyoffice_odoo_templates/data/templates/hr.applicant/CV Templates.pdf new file mode 100644 index 0000000..18dadfe Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/hr.applicant/CV Templates.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/hr.employee/Certificate.pdf b/onlyoffice_odoo_templates/data/templates/hr.employee/Certificate.pdf new file mode 100644 index 0000000..6b93530 Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/hr.employee/Certificate.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/hr.employee/Employee.pdf b/onlyoffice_odoo_templates/data/templates/hr.employee/Employee.pdf new file mode 100644 index 0000000..d90962b Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/hr.employee/Employee.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/hr.employee/Employment Verification.pdf b/onlyoffice_odoo_templates/data/templates/hr.employee/Employment Verification.pdf new file mode 100644 index 0000000..14c9ca9 Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/hr.employee/Employment Verification.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/hr.employee/Resignation letter.pdf b/onlyoffice_odoo_templates/data/templates/hr.employee/Resignation letter.pdf new file mode 100644 index 0000000..29cc429 Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/hr.employee/Resignation letter.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates/sale.order/Bill of sale.pdf b/onlyoffice_odoo_templates/data/templates/sale.order/Bill of sale.pdf new file mode 100644 index 0000000..7eb3bb3 Binary files /dev/null and b/onlyoffice_odoo_templates/data/templates/sale.order/Bill of sale.pdf differ diff --git a/onlyoffice_odoo_templates/data/templates_data.xml b/onlyoffice_odoo_templates/data/templates_data.xml new file mode 100644 index 0000000..5b2d7f3 --- /dev/null +++ b/onlyoffice_odoo_templates/data/templates_data.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/onlyoffice_odoo_templates/doc/index.rst b/onlyoffice_odoo_templates/doc/index.rst new file mode 100644 index 0000000..6595a7b --- /dev/null +++ b/onlyoffice_odoo_templates/doc/index.rst @@ -0,0 +1,27 @@ +Prerequisites +============= + +To be able to work with office files within Odoo Enterprise, you will need an instance of `ONLYOFFICE Docs `_. + +**Please note:** You need to obtain a license for ONLYOFFICE Docs with the included Automation API option. + +ONLYOFFICE app configuration +============================ + +All the settings are configured from the `main ONLYOFFICE app for Odoo `_. + +To adjust the main app settings within your Odoo, go to *Home menu -> Settings -> ONLYOFFICE*. + +In the **Document Server Url**, specify the URL of the installed ONLYOFFICE Docs or the address of ONLYOFFICE Docs Cloud. + +**Document Server JWT Secret**: JWT is enabled by default and the secret key is generated automatically to restrict the access to ONLYOFFICE Docs. if you want to specify your own secret key in this field, also specify the same secret key in the ONLYOFFICE Docs `config file `_ to enable the validation. + +**Document Server JWT Header**: Standard JWT header used in ONLYOFFICE is Authorization. In case this header is in conflict with your setup, you can change the header to the custom one. + +.. image:: settings.png + :width: 800 + + +Contact us +============================ +If you have any questions or suggestions regarding the ONLYOFFICE app for Odoo, please let us know at `forum.onlyoffice.com `_. \ No newline at end of file diff --git a/onlyoffice_odoo_templates/doc/settings.png b/onlyoffice_odoo_templates/doc/settings.png new file mode 100644 index 0000000..5820b71 Binary files /dev/null and b/onlyoffice_odoo_templates/doc/settings.png differ diff --git a/onlyoffice_odoo_templates/i18n/de.po b/onlyoffice_odoo_templates/i18n/de.po new file mode 100644 index 0000000..11b00fe --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/de.po @@ -0,0 +1,320 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:34+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: de_DE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Administrator" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "Sind Sie sicher, dass Sie diesen Datensatz löschen wollen?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Anhang" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Kann ONLYOFFICE-Vorlagen zur Ansicht öffnen und diese ausdrucken." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "Kann ONLYOFFICE-Vorlagen öffnen, erstellen, bearbeiten und ausdrucken." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Abbrechen" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" +"Wählen Sie das nachstehende Feld, um den ausgewählten Parameter an der " +"Cursorposition einzufügen" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "" +"Das Feld konnte nicht eingefügt werden. Bitte prüfen Sie die " +"Automatisierungs-API." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Erstellen oder Hochladen" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Vorlage erstellen" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Löschen" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Herunterladen" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Dropdown-Menü" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Bearbeiten" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Felder" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Gruppieren nach" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Kanban: keine Aktion für Typ: " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetyp" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Modell" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Modellbeschreibung" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Modell, für das die Vorlage erstellt werden soll." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Modul/Sektion" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "ONLYOFFICE-Vorlagen" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE kann nicht erreicht werden. Bitte wenden Sie sich an den " +"Administrator." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICE-Logo" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "ONLYOFFICE-Vorlagen" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Nur PDF-Formulare können hochgeladen werden." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Drucken" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Aus Vorlage drucken" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Mit ONLYOFFICE drucken" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Suchfeld" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Modell auswählen" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Wählen Sie eine vorhandene Vorlage aus. Lassen Sie das Feld leer, um eine " +"leere Vorlage zu erstellen." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Vorlagenname" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Erstellung der Vorlage" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Vorlage gelöscht" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Hochladen der Vorlage" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Unbekannter Fehler" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Vorhandene Vorlage hochladen" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Benutzer" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"Sie haben noch keine Vorlagen. Bitte gehen Sie zur ONLYOFFICE-Vorlagen-App, " +"um eine neue Vorlage zu erstellen oder bitten Sie Ihren Administrator, sie " +"zu erstellen." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Vorlagen" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "ONLYOFFICE-Vorlage" diff --git a/onlyoffice_odoo_templates/i18n/en.po b/onlyoffice_odoo_templates/i18n/en.po new file mode 100644 index 0000000..ebcd55b --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/en.po @@ -0,0 +1,305 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240603\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 08:20+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: \n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "" \ No newline at end of file diff --git a/onlyoffice_odoo_templates/i18n/es.po b/onlyoffice_odoo_templates/i18n/es.po new file mode 100644 index 0000000..9d02ad0 --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/es.po @@ -0,0 +1,319 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:36+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: es_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Administrador" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "¿Está seguro de que desea eliminar este registro?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Archivo adjunto" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Puede abrir las plantillas de ONLYOFFICE para verlas e imprimirlas." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "Puede abrir, crear, editar e imprimir plantillas de ONLYOFFICE." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Cancelar" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" +"Elija el campo siguiente para pegar el parámetro seleccionado en el cursor" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "" +"No se ha podido insertar el campo. Por favor, compruebe la API de " +"automatización." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Crear o subir" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Crear plantilla" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Creado" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Eliminar" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Mostrar nombre" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Descargar" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Menú desplegable" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Editar" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Campos" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Agrupar por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Kanban: ninguna acción para el tipo:  " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Última modificación" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Última actualización" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Tipo Mime" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Modelo" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Descripción del modelo" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Modelo para el que se está creando la plantilla." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Módulo/ sección" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "Plantillas de ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"No se puede acceder a ONLYOFFICE. Por favor, póngase en contacto con el " +"administrador." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "Logotipo de ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "Plantillas de ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Solo se pueden subir formularios PDF." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Imprimir" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Imprimir desde plantilla" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Imprimir con ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Campo de búsqueda" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Seleccionar modelo" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Seleccione una plantilla existente. Deje el campo en blanco para crear una " +"\"plantilla\" en blanco." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Nombre de la plantilla" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Creación de la plantilla" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Plantilla eliminada" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Carga de plantillas" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Error desconocido" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Cargar una plantilla existente" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Usuario" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"Todavía no tiene plantillas. Por favor, acceda a la aplicación Plantillas " +"de ONLYOFFICE para crear una plantilla nueva o pida a su administrador que " +"la cree." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Plantillas" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "Plantilla de ONLYOFFICE" diff --git a/onlyoffice_odoo_templates/i18n/fr.po b/onlyoffice_odoo_templates/i18n/fr.po new file mode 100644 index 0000000..6318fcf --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/fr.po @@ -0,0 +1,317 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:38+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Administrateur" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "Souhaitez-vous vraiment supprimer cet enregistrement ?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Pièce jointe" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Peut ouvrir des modèles ONLYOFFICE pour les afficher et les imprimer." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "Peut ouvrir, créer, éditer et imprimer des modèles ONLYOFFICE." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Annuler" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" +"Sélectionnez la zone ci-dessous pour coller le paramètre sélectionné au " +"curseur" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "" +"Impossible d'insérer le champ. Veuillez vérifier l'API d'automatisation." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Créer ou télécharger" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Créer un modèle" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Supprimer" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Afficher le nom" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Télécharger" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Menu déroulant" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Modifier" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Champs" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Groupe par" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Kanban : aucune action pour le type : " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Modèle" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Description du modèle" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Modèle pour lequel le formulaire est créé." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Module/ section" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "Modèles ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICE n'est pas joignable. Veuillez contacter l'administration." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "Logo ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "Modèles ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Seuls les formulaires PDF peuvent être téléchargés." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Imprimer" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Imprimer à partir du modèle" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Imprimer avec ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Champ de recherche" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Sélectionner un modèle" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Sélectionnez un modèle existant. Laissez le champ vide pour créer un « " +"modèle » vierge." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Nom du modèle" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Création du modèle" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Modèle supprimé" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Chargement du modèle" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Erreur inconnue" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Charger un modèle existant" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Utilisateur" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"Vous n'avez pas encore de modèles. Veuillez vous rendre sur l'application " +"ONLYOFFICE Templates pour créer un nouveau modèle ou demander à votre " +"administrateur de le faire." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Modèles" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "Modèle ONLYOFFICE" diff --git a/onlyoffice_odoo_templates/i18n/it.po b/onlyoffice_odoo_templates/i18n/it.po new file mode 100644 index 0000000..f7c46ff --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/it.po @@ -0,0 +1,316 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:40+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: it_IT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Amministratore" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "Sei sicuro di voler eliminare questo record?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Allegato" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Può aprire i modelli di ONLYOFFICE per visualizzarli e stamparli." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "Può aprire, creare, modificare e stampare modelli di ONLYOFFICE." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Annulla" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" +"Scegli il campo sottostante per incollare il parametro selezionato nel " +"cursore" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "Impossibile inserire il campo. Controlla l'API di automazione." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Crea o carica" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Crea modello" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Elimina" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Visualizza nome" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Scarica" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Menu a discesa" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Modifica" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Campi" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Raggruppa per" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Kanban: nessuna azione per tipo: " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Ultima modifica effettuata il" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento effettuato da" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento effettuato il" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Modello" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Descrizione del modello" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Modulo per il quale viene creato il modello." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Modulo/sezione" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "Modelli ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"Impossibile raggiungere ONLYOFFICE. Si prega di contattare l'amministratore." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "Logo ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "Modelli di ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Solo i moduli PDF possono essere caricati." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Stampa" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Stampa da modello" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Stampa con ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Campo di ricerca" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Seleziona modello" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Seleziona un modello esistente. Lascia il campo vuoto per creare un " +"\"modello\" vuoto." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Nome del modello" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Creazione del modello" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Modello eliminato" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Caricamento del modello" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Errore sconosciuto" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Carica un modello esistente" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Utente" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"Non hai ancora alcun modello. Vai all'app Modelli di ONLYOFFICE per creare " +"un nuovo modello o chiedi al tuo amministratore di crearlo." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Modelli" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "Modello ONLYOFFICE" diff --git a/onlyoffice_odoo_templates/i18n/ja.po b/onlyoffice_odoo_templates/i18n/ja.po new file mode 100644 index 0000000..9bbcbf4 --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/ja.po @@ -0,0 +1,316 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:52+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: ja_JP\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "管理者" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "本当にこのレコードを削除しますか?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "添付ファイル" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "ONLYOFFICEテンプレートを開いて閲覧・印刷できます。" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "ONLYOFFICEテンプレートを開き、作成、編集、印刷することができます。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "キャンセル" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "" +"選択したパラメータをカーソルに貼り付けるには、下のフィールドを選択してくださ" +"い" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "" +"フィールドを挿入できませんでした。オートメーションAPIをご確認ください。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "作成またはアップロード" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "テンプレートの作成" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "作成者" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "作成日" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "削除" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "表示名" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "ダウンロード" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "ドロップダウンメニュー" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "編集" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "フィールド" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "グループ分け" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "カンバン:タイプに対するアクションがありません:" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "最終編集日" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "最終更新したユーザー" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "最終更新日" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "モデル" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "モデルの説明" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "テンプレートが作成されるモデル。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "モジュール/セクション" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "ONLYOFFICEテンプレート" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "ONLYOFFICEにアクセスできません。管理者にご連絡ください。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICEロゴ" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "ONLYOFFICEテンプレート" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "PDFフォームのみアップロード可能です。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "印刷" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "テンプレートから印刷" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "ONLYOFFICEで印刷" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "検索フィールド" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "モデルを選択" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"既存のテンプレートを選択してください。空白の「テンプレート」を作成するには、" +"フィールドを空白のままにしてください。" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "テンプレート名" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "テンプレート作成" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "テンプレートが削除されました" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "テンプレートがアップロードされています" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "不明なエラー" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "既存のテンプレートをアップロード" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "ユーザー" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"まだテンプレートがありません。ONLYOFFICEテンプレートアプリから新しいテンプ" +"レートを作成するか、管理者に作成を依頼してください。" + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "テンプレート" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "ONLYOFFICEテンプレート" diff --git a/onlyoffice_odoo_templates/i18n/pt-BR.po b/onlyoffice_odoo_templates/i18n/pt-BR.po new file mode 100644 index 0000000..d33fc40 --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/pt-BR.po @@ -0,0 +1,314 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:53+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Administrador" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "Tem certeza de que deseja excluir este registro?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Anexo" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Pode abrir modelos do ONLYOFFICE para visualizá-los e imprimi-los." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "Pode abrir, criar, editar e imprimir modelos do ONLYOFFICE." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Cancelar" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "Escolha o campo abaixo para colar o parâmetro selecionado no cursor" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "Não foi possível inserir o campo. Verifique a API de automação." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Criar ou fazer upload" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Criar modelo" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Excluir" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Nome de exibição" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Baixar" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Menu suspenso" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Editar" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Campos" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Agrupar por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Kanban: nenhuma ação para o tipo: " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Última modificação em" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Última atualização por" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Última atualização em" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Modelo" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Descrição do modelo" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Modelo para o qual o modelo está sendo criado." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Módulo/seção" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "Modelos ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"ONLYOFFICE não pode ser alcançado. Entre em contato com o administrador." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "Logotipo do ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "Modelos ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Somente formulário PDF pode ser carregado." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Imprimir" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Imprimir a partir do modelo" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Imprimir com ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Campo de pesquisa" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Selecione o modelo" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Selecione um modelo existente. Deixe o campo em branco para criar um " +"\"modelo\" em branco." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Nome do modelo" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Criação de modelo" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Modelo removido" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Carregamento de modelo" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Erro desconhecido" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Carregar um modelo existente" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Do utilizador" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"Você ainda não tem nenhum modelo. Acesse o aplicativo ONLYOFFICE Templates " +"para criar um novo modelo ou peça ao seu administrador para criá-lo." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Modelos" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "Modelo ONLYOFFICE" diff --git a/onlyoffice_odoo_templates/i18n/ru.po b/onlyoffice_odoo_templates/i18n/ru.po new file mode 100644 index 0000000..e6b4104 --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/ru.po @@ -0,0 +1,317 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:58+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: ru_RU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "Администратор" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "Вы уверены, что хотите удалить эту запись?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "Вложение" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "Вы можете открыть шаблоны ONLYOFFICE для просмотра и распечатать их." + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "" +"Вы можете открывать, создавать, редактировать и распечатывать шаблоны " +"ONLYOFFICE." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "Отменить" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "Выберите поле ниже, чтобы вставить выбранный параметр" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "Нельзя вставить поле. Пожалуйста, проверьте API автоматизацию." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "Создать или загрузить" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "Создать шаблон" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "Создано" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "Дата создания:" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "Удалить" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "Отображаемое имя" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "Скачать" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "Выпадающее меню" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "Редактировать" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "Поля" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "Группировать по" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "Канбан: нет действий для типа: " + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "Дата последнего изменения:" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "Последнее обновление" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "Дата последнего обновления:" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "Модель" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "Описание модели" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "Модель, для которой был создан шаблон." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "Модуль / раздел" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "Шаблоны ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "" +"Приложение ONLYOFFICE недоступно. Пожалуйста, свяжитесь с администратором." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "Логотип ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "Шаблоны ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "Можно загрузить только PDF-форму." + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "Печать" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "Распечатать из шаблона" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "Распечатать с помощью ONLYOFFICE" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "Поле поиска" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "Выбрать модель" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "" +"Выберите существующий шаблон. Оставьте поле пустым, чтобы создать пустой " +"шаблон." + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "Имя шаблона" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "Создание шаблона" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "Шаблон удален" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "Загрузка шаблона" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "Неизвестная ошибка" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "Загрузить существующий шаблон" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "Пользователь" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"У вас пока нет шаблонов. Перейдите в приложение Шаблоны ONLYOFFICE, чтобы " +"создать новый шаблон, или попросите администратора создать его." + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "Шаблоны" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "Шаблон ONLYOFFICE" diff --git a/onlyoffice_odoo_templates/i18n/zh_CN.po b/onlyoffice_odoo_templates/i18n/zh_CN.po new file mode 100644 index 0000000..56f8f56 --- /dev/null +++ b/onlyoffice_odoo_templates/i18n/zh_CN.po @@ -0,0 +1,310 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * onlyoffice_odoo_templates +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e-20240216\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-03 08:20+0000\n" +"PO-Revision-Date: 2024-07-03 17:55+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Administrator" +msgstr "管理员" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Are you sure you want to delete this record?" +msgstr "您确实要删除该记录?" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__attachment_id +msgid "Attachment" +msgstr "附件" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "Can open ONLYOFFICE templates for viewing and print them." +msgstr "打开 ONLYOFFICE 模板进行查看和打印。" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,comment:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_admin +msgid "Can open, create, edit and print ONLYOFFICE templates." +msgstr "打开、创建、编辑和打印 ONLYOFFICE 模板。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Cancel" +msgstr "取消" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Choose the field below to paste selected parameter to the cursor" +msgstr "选择以下字段将选定的参数粘贴到光标处" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js:0 +#, python-format +msgid "Couldn't insert the field. Please check Automation API." +msgstr "无法插入字段。请检查自动化 API。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_controller.xml:0 +#, python-format +msgid "Create or Upload" +msgstr "创建或上传" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Create template" +msgstr "创建模板" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_uid +msgid "Created by" +msgstr "创建者" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__create_date +msgid "Created on" +msgstr "创建于" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Delete" +msgstr "删除" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__display_name +msgid "Display Name" +msgstr "显示名称" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Download" +msgstr "下载" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Dropdown menu" +msgstr "下拉菜单" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban +msgid "Edit" +msgstr "编辑" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Fields" +msgstr "字段" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Group By" +msgstr "分组依据" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__id +msgid "ID" +msgstr "ID" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Kanban: no action for type: " +msgstr "看板:无操作类型:" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates____last_update +msgid "Last Modified on" +msgstr "上次修改日期" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_uid +msgid "Last Updated by" +msgstr "上次更新者" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__write_date +msgid "Last Updated on" +msgstr "上次更新日期" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__mimetype +msgid "Mimetype" +msgstr "Mimetype" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_model +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_kanban_search +msgid "Model" +msgstr "类型" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_name +msgid "Model Description" +msgstr "类型描述" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Model for which the template is being created." +msgstr "正在为其创建模板的类型。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Module/ section" +msgstr "模块/部分" + +#. module: onlyoffice_odoo_templates +#: model:ir.actions.act_window,name:onlyoffice_odoo_templates.action_onlyoffice_odoo_templates +#: model:ir.model,name:onlyoffice_odoo_templates.model_onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_menu +msgid "ONLYOFFICE Templates" +msgstr "ONLYOFFICE 模板" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE cannot be reached. Please contact admin." +msgstr "无法访问 ONLYOFFICE。请联系管理员。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "ONLYOFFICE logo" +msgstr "ONLYOFFICE logo" + +#. module: onlyoffice_odoo_templates +#: model:ir.module.category,name:onlyoffice_odoo_templates.module_category_onlyoffice_odoo_templates +msgid "ONLYOFFICE templates" +msgstr "ONLYOFFICE 模板" + +#. module: onlyoffice_odoo_templates +#. odoo-python +#: code:addons/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py:0 +#, python-format +msgid "Only PDF Form can be uploaded." +msgstr "只能上传 PDF 表单。" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml:0 +#, python-format +msgid "Print" +msgstr "打印" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Print from template" +msgstr "从模板打印" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js:0 +#, python-format +msgid "Print with ONLYOFFICE" +msgstr "使用 ONLYOFFICE 打印" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml:0 +#, python-format +msgid "Search field" +msgstr "搜索字段" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__template_model_id +msgid "Select Model" +msgstr "选择类型" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "" +"Select an existing template. Leave the field blank to create a blank " +"template." +msgstr "选择现有模板。保留字段空白以创建空白模板" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__name +msgid "Template Name" +msgstr "模板名称" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template creation" +msgstr "模板创建" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js:0 +#, python-format +msgid "Template removed" +msgstr "模板已移除" + +#. module: onlyoffice_odoo_templates +#: model_terms:ir.ui.view,arch_db:onlyoffice_odoo_templates.view_onlyoffice_form +msgid "Template uploading" +msgstr "模板上传" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "Unknown error" +msgstr "未知错误" + +#. module: onlyoffice_odoo_templates +#: model:ir.model.fields,field_description:onlyoffice_odoo_templates.field_onlyoffice_odoo_templates__file +msgid "Upload an existing template" +msgstr "上传现有模板" + +#. module: onlyoffice_odoo_templates +#: model:res.groups,name:onlyoffice_odoo_templates.group_onlyoffice_odoo_templates_user +msgid "User" +msgstr "用户" + +#. module: onlyoffice_odoo_templates +#. odoo-javascript +#: code:addons/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js:0 +#, python-format +msgid "" +"You don't have any templates yet. Please go to the ONLYOFFICE Templates app " +"to create a new template or ask your admin to create it." +msgstr "" +"您还没有任何模板。请进入 ONLYOFFICE 模板应用创建新模板,或让管理员创建。" + +#. module: onlyoffice_odoo_templates +#: model:ir.ui.menu,name:onlyoffice_odoo_templates.onlyoffice_submenu +msgid "Templates" +msgstr "模板" + +#~ msgid "ONLYOFFICE Template" +#~ msgstr "ONLYOFFICE 模板" diff --git a/onlyoffice_odoo_templates/models/__init__.py b/onlyoffice_odoo_templates/models/__init__.py new file mode 100644 index 0000000..dfaba67 --- /dev/null +++ b/onlyoffice_odoo_templates/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import onlyoffice_odoo_templates \ No newline at end of file diff --git a/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py b/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py new file mode 100644 index 0000000..d0cea5c --- /dev/null +++ b/onlyoffice_odoo_templates/models/onlyoffice_odoo_templates.py @@ -0,0 +1,197 @@ +import base64 +import copy +import json +import re +import os + +from odoo import _, api, fields, models +from odoo.exceptions import UserError +from odoo.addons.onlyoffice_odoo.utils import file_utils +from odoo.addons.onlyoffice_odoo_templates.utils import pdf_utils +from odoo.modules import get_module_path + +class OnlyOfficeTemplate(models.Model): + _name = "onlyoffice.odoo.templates" + _description = "ONLYOFFICE Templates" + + name = fields.Char(required=True, string="Template Name") + template_model_id = fields.Many2one("ir.model", string="Select Model") + template_model_name = fields.Char("Model Description", related="template_model_id.name") + template_model_model = fields.Char("Model", related="template_model_id.model") + file = fields.Binary(string="Upload an existing template") + attachment_id = fields.Many2one("ir.attachment", readonly=True) + mimetype = fields.Char(default="application/pdf") + + @api.onchange("name") + def _onchange_name(self): + if self.attachment_id: + self.attachment_id.name = self.name + ".pdf" + self.attachment_id.display_name = self.name + + @api.onchange("file") + def _onchange_file(self): + if self.file and self.create_date: # if file exist + decode_file = base64.b64decode(self.file) + is_pdf_form = pdf_utils.is_pdf_form(decode_file) + if not is_pdf_form: + self.file = False + raise UserError(_("Only PDF Form can be uploaded.")) + self.attachment_id.datas = self.file + self.file = False + + @api.model + def _create_demo_data(self): + module_path = get_module_path(self._module) + templates_dir = os.path.join(module_path, "data", "templates") + if not os.path.exists(templates_dir): + return + + model_folders = [name for name in os.listdir(templates_dir) if os.path.isdir(os.path.join(templates_dir, name))] + + installed_models = self.env["ir.model"].search([]) + installed_models_list = [(model.model, model.name) for model in installed_models] + + for model_name in model_folders: + if any(model_name == model[0] for model in installed_models_list): + templates_path = os.path.join(templates_dir, model_name) + templates_name = [name for name in os.listdir(templates_path) if os.path.isfile(os.path.join(templates_path, name)) and name.lower().endswith(".pdf")] + for template_name in templates_name: + template_path = os.path.join(templates_path, template_name) + template = open(template_path, "rb") + try: + template_data = template.read() + template_data = base64.encodebytes(template_data) + model = self.env["ir.model"].search([("model", "=", model_name)], limit=1) + name = template_name.rstrip(".pdf") + self.create({ + "name": name, + "template_model_id": model.id, + "file": template_data, + }) + finally: + template.close() + return + + @api.model + def create(self, vals): + if vals.get("file"): + decode_file = base64.b64decode(vals.get("file")) + is_pdf_form = pdf_utils.is_pdf_form(decode_file) + if not is_pdf_form: + raise UserError(_("Only PDF Form can be uploaded.")) + + file = vals.get("file") or base64.encodebytes(file_utils.get_default_file_template(self.env.user.lang, "pdf")) + mimetype = file_utils.get_mime_by_ext("pdf") + + vals["file"] = file + vals["mimetype"] = mimetype + + datas = vals.pop("file", None) + record = super(OnlyOfficeTemplate, self).create(vals) + if datas: + attachment = self.env["ir.attachment"].create( + { + "name": vals.get("name", record.name) + ".pdf", + "display_name": vals.get("name", record.name), + "mimetype": vals.get("mimetype", ""), + "datas": datas, + "res_model": self._name, + "res_id": record.id, + } + ) + record.attachment_id = attachment.id + return record + + @api.model + def get_fields_for_model(self, model_name): + processed_models = set() + cached_models = {} + + def process_model(model_name): + if model_name in processed_models: + return {} + + processed_models.add(model_name) + + model = self.env["ir.model"].search([("model", "=", model_name)], limit=1) + if not model: + processed_models.discard(model_name) + return {} + description = model.name + + fields = self.env[model_name].fields_get([], attributes=("name", "type", "string", "relation")) + + form_fields = self.env[model_name].get_view()['models'] + form_fields = form_fields[model_name] + + field_list = [] + for field_name, field_props in fields.items(): + field_type = field_props["type"] + + if field_type in ["one2many", "many2many", "many2one"] and field_name not in form_fields: + continue + + if field_type in ["html", "json"]: + continue # TODO: + + field_dict = { + "name": field_name, + "string": field_props.get("string", ""), + "type": field_props["type"], + } + + if field_type in ["one2many", "many2many", "many2one"]: + related_model = field_props["relation"] + if cached_models.get(related_model): + field_dict["related_model"] = { + "name": field_name, + "description": cached_models[related_model]["description"], + "fields": cached_models[related_model]["fields"], + } + else: + if field_type == "many2one": + related_description = self.env["ir.model"].search([("model", "=", related_model)], limit=1) + related_description = related_description.name + related_fields = self.env[related_model].fields_get([], attributes=("name", "type", "string")) + related_form_fields = self.env[related_model].get_view()['models'] + related_form_fields = related_form_fields[related_model] + related_field_list = [] + for (related_field_name, related_field_props) in related_fields.items(): + if related_field_props["type"] in ["html", "json"]: + continue # TODO: + if related_field_name not in related_form_fields: + continue + related_field_dict = { + "name": related_field_name, + "string": related_field_props.get("string", ""), + "type": related_field_props["type"], + } + related_field_list.append(related_field_dict) + related_model_info = { + "name": field_name, + "description": related_description, + "fields": related_field_list, + } + if related_field_list: + field_dict["related_model"] = related_model_info + cached_models[related_model] = related_model_info + else: + processed_model = process_model(related_model) + if processed_model: + field_dict["related_model"] = processed_model + cached_models[related_model] = processed_model + + field_list.append(field_dict) + + model_info = { + "name": model_name, + "description": description, + "fields": field_list, + } + + processed_models.discard(model_name) + return model_info + + models_info = process_model(model_name) + data = json.dumps(models_info, ensure_ascii=False) + return data \ No newline at end of file diff --git a/onlyoffice_odoo_templates/security/ir.model.access.csv b/onlyoffice_odoo_templates/security/ir.model.access.csv new file mode 100644 index 0000000..6d5b2f8 --- /dev/null +++ b/onlyoffice_odoo_templates/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_onlyoffice_odoo_templates_user,OnlyOffice Template User Access,onlyoffice_odoo_templates.model_onlyoffice_odoo_templates,group_onlyoffice_odoo_templates_user,1,0,0,0 +access_onlyoffice_odoo_templates_admin,OnlyOffice Template Admin Access,onlyoffice_odoo_templates.model_onlyoffice_odoo_templates,group_onlyoffice_odoo_templates_admin,1,1,1,1 +access_onlyoffice_odoo_templates,OnlyOffice Template,onlyoffice_odoo_templates.model_onlyoffice_odoo_templates,,0,0,0,0 diff --git a/onlyoffice_odoo_templates/security/onlyoffice_templates_security.xml b/onlyoffice_odoo_templates/security/onlyoffice_templates_security.xml new file mode 100644 index 0000000..4a982fd --- /dev/null +++ b/onlyoffice_odoo_templates/security/onlyoffice_templates_security.xml @@ -0,0 +1,55 @@ + + + + ONLYOFFICE templates + 30 + + + + + User + + Can open ONLYOFFICE templates for viewing and print them. + + + + + Administrator + + + Can open, create, edit and print ONLYOFFICE templates. + + + + + + + + + + + + + + + + + User Access + + + + + + + + + + Administrator Access + + + + + + + + \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/description/access_rights.png b/onlyoffice_odoo_templates/static/description/access_rights.png new file mode 100644 index 0000000..50f2201 Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/access_rights.png differ diff --git a/onlyoffice_odoo_templates/static/description/create_templates.png b/onlyoffice_odoo_templates/static/description/create_templates.png new file mode 100644 index 0000000..cc288c0 Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/create_templates.png differ diff --git a/onlyoffice_odoo_templates/static/description/edit_templates.png b/onlyoffice_odoo_templates/static/description/edit_templates.png new file mode 100644 index 0000000..cd113a6 Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/edit_templates.png differ diff --git a/onlyoffice_odoo_templates/static/description/icon.png b/onlyoffice_odoo_templates/static/description/icon.png new file mode 100644 index 0000000..d1cefbb Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/icon.png differ diff --git a/onlyoffice_odoo_templates/static/description/index.html b/onlyoffice_odoo_templates/static/description/index.html new file mode 100644 index 0000000..a2ca749 --- /dev/null +++ b/onlyoffice_odoo_templates/static/description/index.html @@ -0,0 +1,104 @@ +
      +
      +

      Automate form creation with inserting fields from Odoo in templates

      +
      + +

      + Work with fillable templates in Odoo using ONLYOFFICE. Create templates based on the data and fields available in Odoo, fill them out and print with several clicks. +

      +
      +
      +
      +
      + +
      +
      +
      +
      Edit the existing templates
      +
      +
      +

      + Launch the ONLYOFFICE Templates app to open the page with the existing form templates. Each template has a tag indicating which Odoo module the template was created for. +

      +

      + When you click the Edit button in the file context menu, a form template will open in the ONLYOFFICE editor. The left panel dynamically displays the fields from Odoo that can be linked to the ONLYOFFICE form fields. The Odoo field ID is written in the Key field of the editor in the right panel. +

      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +
      Create new templates
      +
      +
      +

      + To create a new template, click the Create&Upload button. In the pop-up window, specify the template name and select the Odoo module to which the template belongs. +

      +
      +
      +
      + +
      +
      +
      +

      + You can upload any existing form template from your local drive (using the Upload your file button), or save a new blank template (using the Create button in the upper right corner). +

      +
      +
      +
      + +
      +
      +
      +
      Work with ready templates
      +
      +
      +

      + The ONLYOFFICE app is integrated into all sections/modules of Odoo. You can print the form by clicking the "Print with ONLYOFFICE" button in the Action menu. +

      +
      +
      +
      + +
      +
      +
      +

      + Next, a window appears with a list of templates available for this section. Select the required template so that it is filled with the data taken from the linked Odoo page (deal, employee card, etc.). +

      +
      +
      +
      + +
      +
      +
      +
      Access rights
      +
      +
      +

      + There are two types of roles for this app: +

      +
        +
      • User: can print templates and open them for viewing. Users cannot create new templates and cannot edit the current ones.
      • +
      • Administrator: can open, create, edit and print templates.
      • +
      +

      + The role type is specified in the user profile. By default, all users are assigned the User role. +

      +
      +
      +
      + +
      +
      +
      +
      \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/description/main_screenshot.png b/onlyoffice_odoo_templates/static/description/main_screenshot.png new file mode 100644 index 0000000..5442b70 Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/main_screenshot.png differ diff --git a/onlyoffice_odoo_templates/static/description/work_with_templates.png b/onlyoffice_odoo_templates/static/description/work_with_templates.png new file mode 100644 index 0000000..0ec52f8 Binary files /dev/null and b/onlyoffice_odoo_templates/static/description/work_with_templates.png differ diff --git a/onlyoffice_odoo_templates/static/src/css/onlyoffice_dialog.scss b/onlyoffice_odoo_templates/static/src/css/onlyoffice_dialog.scss new file mode 100644 index 0000000..72658b5 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/css/onlyoffice_dialog.scss @@ -0,0 +1,4 @@ +.o_onlyoffice_kanban_record_selected { + border-color: #017e84; + box-shadow: 0 0 0 2px #017e84; +} \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor.scss b/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor.scss new file mode 100644 index 0000000..7d996bb --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor.scss @@ -0,0 +1,99 @@ +.o-onlyoffice-template { + display: flex; + + iframe { + width: 100%; + height: 100%; + } + + .o-onlyoffice-template-panel { + width: 260px; + max-width: 260px; + height: 100%; + flex-shrink: 0; + font-size: 11px; + border-right: 1.5px var(--gray-300) solid; + + .o-onlyoffice-panel-header { + display: flex; + height: 54px; + padding: 10px; + align-items: center; + + span { + font-weight: bold; + } + } + + .o-onlyoffice-panel-separator { + width: 100%; + height: 1.5px; + margin: 0; + flex-shrink: 0; + border-color: var(--gray-300); + } + + .o-onlyoffice-panel-body { + display: flex; + height: calc(100% - 56px); + flex-direction: column; + row-gap: 10px; + padding: 10px; + + .o-onlyoffice-body-title { + span { + } + } + + .o-onlyoffice-body-search { + display: flex; + flex-direction: column; + row-gap: 10px; + + .o-onlyoffice-search-title { + span { + font-weight: bold; + text-transform: capitalize; + } + } + + .o-onlyoffice-search-field { + position: relative; + + input { + height: 24px; + } + + button { + display: flex; + position: absolute; + top: 0; + right: 0; + align-items: center; + border: none; + height: 100%; + background-color: transparent; + + svg { + path { + fill: var(--gray-900); + } + + width: 14px; + height: 14px; + } + } + } + } + + .o-onlyoffice-body-models { + display: flex; + flex-direction: column; + padding-right: 4px; + row-gap: 5px; + overflow-y: auto; + overflow-x: hidden; + } + } + } +} \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor_component.scss b/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor_component.scss new file mode 100644 index 0000000..a153445 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/css/onlyoffice_editor_component.scss @@ -0,0 +1,103 @@ +.o-onlyoffice-models-list { + display: flex; + flex-direction: column; + row-gap: 5px; + + .o-onlyoffice-model { + .o-onlyoffice-model-button { + padding: 5px 10px 5px 20px; + width: 100%; + text-align: start; + padding-left: 20px; + font-weight: bold; + position: relative; + border: none; + background-color: inherit; + + svg { + path { + fill: var(--gray-900); + } + + position: absolute; + left: 10px; + height: 100%; + top: 0; + } + + .o-onlyoffice-model-description { + text-wrap: nowrap; + text-overflow: ellipsis; + overflow: hidden; + text-transform: capitalize; + color: var(--gray-900); + } + + .o-onlyoffice-model-name { + text-wrap: nowrap; + text-overflow: ellipsis; + overflow: hidden; + color: var(--gray-500); + } + } + + .o-onlyoffice-model-button:hover { + background-color: var(--gray-300); + } + + .o-onlyoffice-model-button_open { + svg { + transform: rotate(90deg); + } + + background-color: var(--gray-300); + } + } + + .o-onlyoffice-fields-list { + display: flex; + flex-direction: column; + row-gap: 5px; + } + + .o-onlyoffice-field { + padding: 5px 10px; + border: 1px var(--gray-300) solid; + text-align: center; + font-weight: bold; + cursor: pointer; + text-overflow: ellipsis; + overflow: hidden; + text-wrap: nowrap; + + .o-onlyoffice-field-name { + text-wrap: nowrap; + text-overflow: ellipsis; + overflow: hidden; + color: var(--gray-500); + } + + .o-onlyoffice-field-string { + text-wrap: nowrap; + text-overflow: ellipsis; + overflow: hidden; + color: var(--gray-900); + } + } + + .o-onlyoffice-field:hover { + background-color: var(--gray-200); + } + + .o-onlyoffice-field:active { + background-color: var(--gray-200); + } +} + +.o-onlyoffice-fields-separator { + width: 100%; + height: 2px; + margin: 10px 0; + flex-shrink: 0; + border-color: var(--gray-300); +} \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js b/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js new file mode 100644 index 0000000..7b74917 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.js @@ -0,0 +1,143 @@ +/** @odoo-module **/ +import { Dialog } from "@web/core/dialog/dialog"; +import { Pager } from "@web/core/pager/pager"; +import { KeepLast } from "@web/core/utils/concurrency"; +import { SearchModel } from "@web/search/search_model"; +import { useService } from "@web/core/utils/hooks"; +import { useHotkey } from "@web/core/hotkeys/hotkey_hook"; +import { getDefaultConfig } from "@web/views/view"; +import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; + +import { _t } from "@web/core/l10n/translation"; + +const { Component, useState, useSubEnv, useChildSubEnv, onWillStart } = owl; + +export class TemplateDialog extends Component { + setup() { + this.orm = useService("orm"); + this.rpc = useService("rpc"); + this.viewService = useService("view"); + this.notificationService = useService("notification"); + this.dialog = useService("dialog"); + + this.data = this.env.dialogData; + useHotkey("escape", () => this.data.close()); + + this.dialogTitle = _t("Print from template"); + this.limit = 8; + this.state = useState({ + isOpen: true, + templates: [], + totalTemplates: 0, + selectedTemplateId: null, + currentOffset: 0, + isProcessing: false, + }); + + useSubEnv({ + config: { + ...getDefaultConfig(), + }, + }); + + this.model = new SearchModel(this.env, { + user: useService("user"), + orm: this.orm, + view: useService("view"), + }); + + useChildSubEnv({ + searchModel: this.model, + }); + + this.dp = new KeepLast(); + + onWillStart(async () => { + const { resModel } = this.props; + const views = await this.viewService.loadViews({ + resModel: "onlyoffice.odoo.templates", + context: this.props.context, + views: [[false, "search"]], + }); + await this.model.load({ + resModel: "onlyoffice.odoo.templates", + domain: [["template_model_model", "=", resModel]], + context: this.props.context, + orderBy: "id", + searchMenuTypes: [], + searchViewArch: views.views.search.arch, + searchViewId: views.views.search.id, + searchViewFields: views.fields, + }); + await this.fetchTemplates(); + }); + } + + async createTemplate() { + //TODO: create template from dialog + } + + async fetchTemplates(offset = 0) { + const { domain, context } = this.model; + const records = await this.orm.searchRead( + "onlyoffice.odoo.templates", + domain, + ["name", "create_date", "create_uid", "attachment_id", "mimetype"], + { context, order: 'id', limit: this.limit, offset } + ); + this.state.templates = records; + const length = await this.orm.searchCount("onlyoffice.odoo.templates", domain, { context }); + if (!length) { + this.dialog.add(AlertDialog, { + title: this.dialogTitle, + body: _t("You don't have any templates yet. Please go to the ONLYOFFICE Templates app to create a new template or ask your admin to create it."), + }); + return this.data.close(); + } else { + this.state.totalTemplates = length; + } + } + + async fillTemplate() { + this.state.isProcessing = true; + + const templateId = this.state.selectedTemplateId; + const { resId, resModel } = this.props; + + const response = await this.rpc("/onlyoffice/template/get_filled_template", { + template_id: templateId, + record_id: resId, + model_name: resModel, + }); + + if (!response) { + this.notificationService.add(_t("Unknown error"), { type: "danger" }); + } else if (response.href) { + window.location.href = response.href; + } else if (response.error) { + this.notificationService.add(_t(response.error), { type: "danger" }); + } + this.data.close(); + } + + selectTemplate(templateId) { + this.state.selectedTemplateId = templateId; + } + + isSelected(templateId) { + return this.state.selectedTemplateId === templateId; + } + + onPagerChange({ offset }) { + this.state.currentOffset = offset; + this.state.selectedTemplateId = null; + return this.fetchTemplates(this.state.currentOffset); + } + + isButtonDisabled() { + return this.state.isProcessing || this.state.selectedTemplateId === null; + } +} + +TemplateDialog.template = "onlyoffice_odoo_templates.TemplateDialog"; +TemplateDialog.components = { Dialog, Pager }; diff --git a/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml b/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml new file mode 100644 index 0000000..421f8d4 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/dialog/onlyoffice_dialog.xml @@ -0,0 +1,74 @@ + + + +
      + +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + +
      +
      +
      +
      \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js new file mode 100644 index 0000000..4e86bcd --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.js @@ -0,0 +1,281 @@ +/** @odoo-module **/ + +import { registry } from "@web/core/registry"; +import { useBus, useService } from "@web/core/utils/hooks"; +import { cookie } from "@web/core/browser/cookie"; +import { EditorComponent } from "./onlyoffice_editor_component"; + +import { _t } from "@web/core/l10n/translation"; + +const { Component, useState, onMounted, onWillUnmount } = owl; + +class TemplateEditor extends Component { + setup() { + super.setup(...arguments); + this.orm = useService("orm"); + this.rpc = useService("rpc"); + this.viewService = useService("view"); + this.EditorComponent = EditorComponent; + this.notificationService = useService("notification"); + + this.state = useState({ + models: null, + searchString: "", + }); + + this.config = null; + this.docApiJS = null; + this.documentReady = false; + this.hasLicense = false; + this.script = null; + this.unchangedModels = {}; + + useBus(this.env.bus, "onlyoffice-template-field-click", (field) => this.onFieldClick(field.detail)); + + onMounted(async () => { + try { + if (!this.props.id) { + const urlParams = new URLSearchParams(window.location.hash); + let id = urlParams.get('id'); + if (!id) return + this.props.id = id; + } + + const [{ template_model_model, attachment_id }] = await this.orm.read("onlyoffice.odoo.templates", [parseInt(this.props.id)], ["template_model_model", "attachment_id"]); + + // Set id to URL + if (!new URLSearchParams(window.location.hash).has("id")) { + const newUrl = window.location.href + `&id=${this.props.id}`; + history.replaceState(null, null, newUrl); + } + + const models = JSON.parse( + await this.orm.call("onlyoffice.odoo.templates", "get_fields_for_model", [template_model_model]), + ); + + // Add keys to field + const formattedModels = this.formatModels(models); + this.unchangedModels = formattedModels; + + const response = await this.rpc(`/onlyoffice/template/editor`, { + attachment_id: attachment_id[0], + }); + const config = JSON.parse(response.editorConfig); + config.events = { + onDocumentReady: () => { + if (window.docEditor && 'createConnector' in window.docEditor) { + window.connector = docEditor.createConnector(); + window.connector.executeMethod("GetVersion", [], (_version) => { + this.hasLicense = true; + }); + } + // Render fields + this.state.models = formattedModels; + this.documentReady = true; + }, + }; + const theme = cookie.get("color_scheme"); + config.editorConfig.customization = { + ...config.editorConfig.customization, + uiTheme: theme ? `theme-${theme}` : "theme-light", + }; + this.config = config; + + this.docApiJS = response.docApiJS; + if (!window.DocsAPI) { + await this.loadDocsAPI(this.docApiJS); + } + if (window.DocsAPI) { + window.docEditor = new DocsAPI.DocEditor("doceditor", this.config); + } else { + throw new Error("window.DocsAPI is null"); + } + } catch (error) { + console.error("onMounted TemplateEditor error:", error); + document.getElementById("error").classList.remove("d-none"); + } + }); + + onWillUnmount(() => { + if (window.connector) { + window.connector.disconnect(); + delete window.connector; + } + if (window.docEditor) { + window.docEditor.destroyEditor(); + delete window.docEditor; + } + if (this.script && this.script.parentNode) { + this.script.parentNode.removeChild(this.script); + } + if (window.DocsAPI) { + delete window.DocsAPI; + } + }); + } + + async loadDocsAPI(DocsAPI) { + return new Promise((resolve, reject) => { + const script = document.createElement("script"); + script.src = DocsAPI; + script.onload = resolve; + script.onerror = reject; + document.body.appendChild(script); + this.script = script; + }); + } + + formatModels(models, parentNames = []) { + if (!models.fields) return models; + models.fields = models.fields.map((field) => { + const key = [...parentNames, field.name].join(" "); + field.key = key; + if (field.related_model) { + field.related_model = this.formatModels(field.related_model, [...parentNames, field.name]); + } + return field; + }).sort((a, b) => { + if (a.related_model && !b.related_model) { + return -1; + } + if (!a.related_model && b.related_model) { + return 1; + } + return a.key.localeCompare(b.key); + }); + return models; + } + + setModelsFilter() { + const searchAndExpand = (models) => { + if (!models.fields) return; + const searchString = this.state.searchString.toLowerCase(); + const filteredFields = models.fields.filter(field => { + if (field.key.split(' ').pop().toLowerCase().includes(searchString)) { + return true; + } else if (field.related_model) { + field.related_model = searchAndExpand(field.related_model); + return field.related_model !== null; + } + return false; + }); + + if (filteredFields.length === 0) { + return null; + } + + return { + ...models, + fields: filteredFields + }; + } + const unchangedModels = structuredClone(this.unchangedModels); + this.state.models = searchAndExpand(unchangedModels); + } + + onCleanSearchClick() { + if (this.documentReady) { + this.state.searchString = ""; + this.state.models = this.unchangedModels; + } + } + + onSearchInput() { + if (this.documentReady) { + if (this.state.searchString) { + this.setModelsFilter(); + } else { + this.onCleanSearchClick(); + } + } + } + + onFieldClick(field) { + if (this.documentReady) { + if (!this.hasLicense) { + this.notificationService.add(_t("Couldn't insert the field. Please check Automation API."), { type: "danger" }); + return; + } else { + const type = field.type; + // TODO: add image form and other forms + if ( + type === "char" || + type === "text" || + type === "selection" || + type === "integer" || + type === "float" || + type === "monetary" || + type === "date" || + type === "datetime" || + type === "many2one" || + type === "one2many" || + type === "many2many" + ) { + this.createTextForm(field); + } + if (type === "boolean") { + this.createCheckBoxForm(field); + } + if (type === "binary") { + this.createPictureForm(field); + } + window.docEditor.grabFocus(); + } + } + } + + createTextForm = (data) => { + Asc.scope.data = data; + window.connector.callCommand(() => { + var oDocument = Api.GetDocument(); + var oTextForm = Api.CreateTextForm({ + key: Asc.scope.data.key, + placeholder: Asc.scope.data.string, + tip: Asc.scope.data.string, + tag: Asc.scope.data.model, + }); + var oParagraph = Api.CreateParagraph(); + oParagraph.AddElement(oTextForm); + oDocument.InsertContent([oParagraph], true, { KeepTextOnly: true }); + }); + }; + + createCheckBoxForm = (data) => { + Asc.scope.data = data; + window.connector.callCommand(() => { + var oDocument = Api.GetDocument(); + var oCheckBoxForm = Api.CreateCheckBoxForm({ + key: Asc.scope.data.key, + tip: Asc.scope.data.string, + tag: Asc.scope.data.model, + }); + oCheckBoxForm.ToInline(); + var oParagraph = Api.CreateParagraph(); + oParagraph.AddElement(oCheckBoxForm); + oDocument.InsertContent([oParagraph], true, { KeepTextOnly: true }); + }); + }; + + createPictureForm = (data) => { + Asc.scope.data = data; + window.connector.callCommand(() => { + var oDocument = Api.GetDocument(); + var oPictureForm = Api.CreatePictureForm({ + key: Asc.scope.data.key, + placeholder: Asc.scope.data.string, + tip: Asc.scope.data.string, + tag: Asc.scope.data.model, + }); + var oParagraph = Api.CreateParagraph(); + oParagraph.AddElement(oPictureForm); + oDocument.InsertContent([oParagraph], true, { KeepTextOnly: true }); + }); + }; +} +TemplateEditor.components = { + ...Component.components, + EditorComponent, +}; +TemplateEditor.template = "onlyoffice_odoo_templates.TemplateEditor"; + +registry.category("actions").add("onlyoffice_odoo_templates.TemplateEditor", TemplateEditor); diff --git a/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml new file mode 100644 index 0000000..1ef6f90 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor.xml @@ -0,0 +1,89 @@ + + + + + + + + ONLYOFFICE + + + + + +
      +
      + Fields +
      +
      +
      +
      + + Choose the field below to paste selected parameter to the cursor + +
      + +
      + +
      + +
      + + + + + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      + ONLYOFFICE logo +
      +

      + ONLYOFFICE cannot be reached. Please contact admin. +

      +
      +
      + + + + \ No newline at end of file diff --git a/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.js b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.js new file mode 100644 index 0000000..03d5a6d --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { Component, useState } from "@odoo/owl"; + +export class EditorComponent extends Component { + setup() { + this.state = useState({ + isExpanded: false + }); + } + toggleExpand() { + this.state.isExpanded = !this.state.isExpanded; + } + + onFieldClick(field) { + this.env.bus.trigger("onlyoffice-template-field-click", field); + } +} +EditorComponent.components = { + ...Component.components, + EditorComponent, +}; +EditorComponent.template = "onlyoffice_odoo_templates.EditorComponent"; +EditorComponent.props = ["model", "searchString", "level"]; diff --git a/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.xml b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.xml new file mode 100644 index 0000000..c6e01e7 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/editor/onlyoffice_editor_component.xml @@ -0,0 +1,41 @@ + +
      +
      + +
      +
      + + + + + + + + +
      +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js b/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js new file mode 100644 index 0000000..6452bf8 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/form/onlyoffice_form_view.js @@ -0,0 +1,30 @@ +/** @odoo-module **/ +import { FormController } from "@web/views/form/form_controller"; +import { patch } from "@web/core/utils/patch"; +import { TemplateDialog } from "../dialog/onlyoffice_dialog"; +import { _t } from "@web/core/l10n/translation"; + +patch(FormController.prototype, { + setup() { + super.setup(...arguments); + }, + + getStaticActionMenuItems() { + const { activeActions } = this.archInfo; + const menuItems = super.getStaticActionMenuItems(...arguments); + menuItems.printWithOnlyoffice = { + isAvailable: () => activeActions.type === "view", + sequence: 60, + icon: "fa fa-print", + description: _t("Print with ONLYOFFICE"), + callback: () => { + this.env.services.dialog.add(TemplateDialog, { + resId: this.model.root.resId, + resModel: this.props.resModel, + }); + }, + skipSave: true, + } + return menuItems + } +}); diff --git a/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js new file mode 100644 index 0000000..421b016 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_record.js @@ -0,0 +1,36 @@ +/** @odoo-module **/ +import { CANCEL_GLOBAL_CLICK, KanbanRecord } from "@web/views/kanban/kanban_record"; +import { useService } from "@web/core/utils/hooks"; + +export class OnlyofficeKanbanRecord extends KanbanRecord { + setup() { + super.setup(...arguments); + this.orm = useService("orm"); + this.actionService = useService("action"); + } + + /** + * @override + */ + async onGlobalClick(ev) { + if (ev.target.closest(CANCEL_GLOBAL_CLICK) && !ev.target.classList.contains("o_onlyoffice_download")) { + return; + } + if (ev.target.classList.contains("o_onlyoffice_download")) { + window.location.href = `/onlyoffice/template/download/${this.props.record.data.attachment_id[0]}`; + return; + } + return this.editTemplate(); + } + + async editTemplate() { + const action = { + type: "ir.actions.client", + tag: "onlyoffice_odoo_templates.TemplateEditor", + target: "current", + }; + return this.actionService.doAction(action, { + props: this.props.record.data, + }); + } +} diff --git a/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_renderer.js b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_renderer.js new file mode 100644 index 0000000..774e3f0 --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_renderer.js @@ -0,0 +1,29 @@ +/** @odoo-module **/ + +import { KanbanRenderer } from "@web/views/kanban/kanban_renderer"; +import { OnlyofficeKanbanRecord } from "./onlyoffice_kanban_record"; + +export class OnlyofficeKanbanRenderer extends KanbanRenderer { + setup() { + super.setup(...arguments); + } + + /** + * @override + **/ + canQuickCreate() { + return false; + } + + /** + * @override + **/ + canCreateGroup() { + return false; + } +} + +OnlyofficeKanbanRenderer.components = { + ...KanbanRenderer.components, + KanbanRecord: OnlyofficeKanbanRecord, +}; diff --git a/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_view.js b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_view.js new file mode 100644 index 0000000..d98051a --- /dev/null +++ b/onlyoffice_odoo_templates/static/src/views/kanban/onlyoffice_kanban_view.js @@ -0,0 +1,11 @@ +/** @odoo-module */ +import { registry } from "@web/core/registry"; +import { kanbanView } from "@web/views/kanban/kanban_view"; +import { OnlyofficeKanbanRenderer } from "./onlyoffice_kanban_renderer"; + +export const onlyofficeKanbanView = { + ...kanbanView, + Renderer: OnlyofficeKanbanRenderer +}; + +registry.category("views").add("onlyoffice_kanban", onlyofficeKanbanView); diff --git a/onlyoffice_odoo_templates/static/svg/onlyoffice_logo.svg b/onlyoffice_odoo_templates/static/svg/onlyoffice_logo.svg new file mode 100644 index 0000000..2b5d932 --- /dev/null +++ b/onlyoffice_odoo_templates/static/svg/onlyoffice_logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/onlyoffice_odoo_templates/utils/pdf_utils.py b/onlyoffice_odoo_templates/utils/pdf_utils.py new file mode 100644 index 0000000..bc1f267 --- /dev/null +++ b/onlyoffice_odoo_templates/utils/pdf_utils.py @@ -0,0 +1,38 @@ +# TODO: add convert docx to pdf + +def is_pdf_form(text): + if not text: + return False + + index_first = text.find(b'%\xCD\xCA\xD2\xA9\x0D') + if index_first == -1: + return False + + p_first = text[index_first + 6:] + + if not p_first.startswith(b'1 0 obj\x0A<<\x0A'): + return False + + p_first = p_first[11:] + + signature = b'ONLYOFFICEFORM' + index_stream = p_first.find(b'stream\x0D\x0A') + index_meta = p_first.find(signature) + + if index_stream == -1 or index_meta == -1 or index_stream < index_meta: + return False + + p_meta = p_first[index_meta:] + p_meta = p_meta[len(signature) + 3:] + + index_meta_last = p_meta.find(b' ') + if index_meta_last == -1: + return False + + p_meta = p_meta[index_meta_last + 1:] + + index_meta_last = p_meta.find(b' ') + if index_meta_last == -1: + return False + + return True \ No newline at end of file diff --git a/onlyoffice_odoo_templates/views/onlyoffice_menu_views.xml b/onlyoffice_odoo_templates/views/onlyoffice_menu_views.xml new file mode 100644 index 0000000..538d579 --- /dev/null +++ b/onlyoffice_odoo_templates/views/onlyoffice_menu_views.xml @@ -0,0 +1,118 @@ + + + + + onlyoffice.odoo.templates.form + onlyoffice.odoo.templates + +
      + + + + + + + + + + + +
      +
      +
      + + + onlyoffice.odoo.templates.kanban.search + onlyoffice.odoo.templates + + + + + + + + + + + + + + + + onlyoffice.odoo.templates.kanban + onlyoffice.odoo.templates + + + + + + + + + + + + + Edit + Delete + Download + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +
      +
      + + + +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + ONLYOFFICE Templates + onlyoffice.odoo.templates + kanban,form + + + + + +
      +
      \ No newline at end of file