mirror of
https://github.com/bringout/euro-office.git
synced 2026-04-18 04:22:01 +02:00
init: Euro-Office Odoo 16.0 modules
Based on onlyoffice_odoo by Ascensio System SIA (ONLYOFFICE, LGPL-3). Rebranded and adapted for Euro-Office by bring.out d.o.o. Modules: - eurooffice_odoo: base integration - eurooffice_odoo_templates: document templates - eurooffice_odoo_oca_dms: OCA DMS integration (replaces Enterprise documents) All references renamed: onlyoffice -> eurooffice, ONLYOFFICE -> Euro-Office. Original copyright notices preserved.
This commit is contained in:
commit
b59a9dc6bb
347 changed files with 16699 additions and 0 deletions
|
|
@ -0,0 +1,187 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- -->
|
||||
<!-- (c) Copyright Ascensio System SIA 2024 -->
|
||||
<!-- -->
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.eurooffice_odoo</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="10" />
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" string="Euro-Office" data-string="Euro-Office" data-key="eurooffice_odoo">
|
||||
<div>
|
||||
<h2>Welcome to Euro-Office!</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">
|
||||
About
|
||||
</span>
|
||||
<div class="text-muted" style="text-wrap: nowrap;">
|
||||
This app enables creating, editing, and collaborating on fillable forms, office files, and attached documents in Odoo using Euro-Office Docs.
|
||||
</div>
|
||||
<div>
|
||||
<a class="oe_link" href="https://helpcenter.eurooffice.com/integration/odoo.aspx" target="_blank">
|
||||
<i class="fa fa-arrow-right" /> Learn more </a>
|
||||
<br />
|
||||
<a
|
||||
class="oe_link"
|
||||
href="https://feedback.eurooffice.com/forums/966080-your-voice-matters?category_id=519288"
|
||||
target="_blank"
|
||||
>
|
||||
<i class="fa fa-arrow-right" /> Suggest a feature </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>General Settings</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Euro-Office Docs address</span>
|
||||
<div class="text-muted content-group mt16">
|
||||
<field name="doc_server_public_url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="doc_server_disable_certificate" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label class="o_form_label" for="doc_server_disable_certificate">
|
||||
Disable certificate verification
|
||||
</label>
|
||||
<div class="text-muted">
|
||||
Only use when accessing Document Server with a self-signed certificate
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">
|
||||
Euro-Office Docs secret key
|
||||
</span>
|
||||
<div class="text-muted content-group mt16">
|
||||
<field name="doc_server_jwt_secret" password="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">
|
||||
JWT Header
|
||||
</span>
|
||||
<div class="text-muted content-group mt16">
|
||||
<field name="doc_server_jwt_header" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">
|
||||
Euro-Office Docs address for internal requests from the server
|
||||
</span>
|
||||
<div class="text-muted content-group mt16">
|
||||
<field name="doc_server_odoo_url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">
|
||||
Server address for internal requests from Euro-Office Docs
|
||||
</span>
|
||||
<div class="text-muted content-group mt16">
|
||||
<field name="doc_server_inner_url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="doc_server_demo" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label class="o_form_label" for="doc_server_demo">
|
||||
Connect to demo Euro-Office Docs server
|
||||
</label>
|
||||
<a
|
||||
title="Euro-Office Templates requires a properly licensed Document Server connected with Odoo. Contact sales at sales@eurooffice.com to acquire the proper license."
|
||||
class="o_doc_link"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
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.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane eurooffice_link_pane">
|
||||
<div class="eurooffice_link_container">
|
||||
<a
|
||||
class="eurooffice_link_button"
|
||||
href="https://www.eurooffice.com/docs-registration.aspx"
|
||||
target="_blank"
|
||||
>
|
||||
GET NOW
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_eurooffice_settings_common">
|
||||
<h2>Common settings</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="same_tab" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label class="o_form_label" for="same_tab">
|
||||
Open file in the same tab
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_eurooffice_config_settings" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_id" ref="res_config_settings_view_form" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module' : 'eurooffice_odoo'}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- -->
|
||||
<!-- (c) Copyright Ascensio System SIA 2024 -->
|
||||
<!-- -->
|
||||
<odoo>
|
||||
<template id="eurooffice_layout" name="Euro-Office Editor">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title> Euro-Office - <t t-out="docTitle" /> </title>
|
||||
<link rel="icon" t-att-href="docIcon" type="image/x-icon" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<t t-call-assets="web.assets_frontend" t-js="false" />
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<script t-nocache="Session information should always be up to date." type="text/javascript">
|
||||
var odoo = {
|
||||
csrf_token: "<t t-nocache="The csrf token must always be up to date." t-esc="request.csrf_token(None)" />",
|
||||
debug: "<t t-esc="debug" />",
|
||||
};
|
||||
odoo.__session_info__ = <t t-out="json.dumps(request.env['ir.http'].get_frontend_session_info())" />;
|
||||
if (!/(^|;\s)tz=/.test(document.cookie)) {
|
||||
const userTZ = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
document.cookie = `tz=${userTZ}; path=/`;
|
||||
}
|
||||
</script>
|
||||
<t t-call-assets="web.assets_frontend_minimal" t-css="false" defer_load="True" />
|
||||
<t t-call="web.conditional_assets_tests" />
|
||||
<t t-call-assets="web.assets_frontend_lazy" t-css="false" lazy_load="True" />
|
||||
</head>
|
||||
<body>
|
||||
<t t-out="0" />
|
||||
</body>
|
||||
</html>
|
||||
</template>
|
||||
|
||||
<template id="eurooffice_editor" name="Euro-Office Editor">
|
||||
<t t-call="eurooffice_odoo.eurooffice_layout">
|
||||
<div id="doceditor" />
|
||||
<div id="error" class="w-25 m-auto my-5 py-5 d-flex flex-column d-none">
|
||||
<img src="/eurooffice_odoo/static/svg/logo.svg" alt="Euro-Office logo" />
|
||||
<div class="my-3 alert alert-danger">
|
||||
<p> Euro-Office cannot be reached. Please contact admin. </p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" t-att-src="docApiJS" />
|
||||
<script type="text/javascript">
|
||||
function getCookie(name) {
|
||||
const value = `; ${document.cookie}`;
|
||||
const parts = value.split(`; ${name}=`);
|
||||
if (parts.length === 2) {
|
||||
return parts.pop().split(";").shift();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// Skip version mismatch check between web-apps (x2t) and Euro-Office docservice
|
||||
// web-apps About dialog shows x2t version (e.g. 9.2.1) but docservice reports
|
||||
// Euro-Office version (0-unstable-*). Setting compareVersions bypasses the check.
|
||||
window.compareVersions = true;
|
||||
const color_scheme = getCookie('color_scheme');
|
||||
var config = JSON.parse('<t t-out="editorConfig" />');
|
||||
config.editorConfig.customization.uiTheme = color_scheme ? `default-${color_scheme}` : "default-light";
|
||||
if (window?.opener?.location?.href) {
|
||||
if (window.opener.location.origin === window.origin) {
|
||||
config.editorConfig.customization.goback = {
|
||||
blank: false,
|
||||
url: window.opener.location.href
|
||||
}
|
||||
}
|
||||
}
|
||||
if (window.DocsAPI) {
|
||||
config.events = config.events || {};
|
||||
config.events.onError = function(event) {
|
||||
console.error("Euro-Office Error:", JSON.stringify(event));
|
||||
var errorDiv = document.getElementById("error");
|
||||
errorDiv.classList.remove("d-none");
|
||||
errorDiv.querySelector(".alert-danger p").textContent =
|
||||
"Euro-Office Error: " + (event.data ? JSON.stringify(event.data) : JSON.stringify(event));
|
||||
};
|
||||
var docEditor = new DocsAPI.DocEditor("doceditor", config);
|
||||
} else {
|
||||
document.getElementById("error").classList.remove("d-none");
|
||||
}
|
||||
</script>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue