mirror of
https://github.com/bringout/euro-office.git
synced 2026-04-22 09:22:04 +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,42 @@
|
|||
#
|
||||
# (c) Copyright Ascensio System SIA 2024
|
||||
#
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
class Format:
|
||||
def __init__(self, name, type, actions=None, convert=None, mime=None):
|
||||
if actions is None:
|
||||
actions = []
|
||||
if convert is None:
|
||||
convert = []
|
||||
if mime is None:
|
||||
mime = []
|
||||
self.name = name
|
||||
self.type = type
|
||||
self.actions = actions
|
||||
self.convert = convert
|
||||
self.mime = mime
|
||||
|
||||
|
||||
def get_supported_formats():
|
||||
file_path = os.path.join(
|
||||
os.path.dirname(__file__), "..", "static", "assets", "document_formats", "eurooffice-docs-formats.json"
|
||||
)
|
||||
|
||||
with open(file_path, encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
|
||||
formats = []
|
||||
for item in data:
|
||||
n = item["name"]
|
||||
t = item["type"]
|
||||
a = item.get("actions", [])
|
||||
c = item.get("convert", [])
|
||||
m = item.get("mime", [])
|
||||
|
||||
formats.append(Format(n, t, a, c, m))
|
||||
|
||||
return formats
|
||||
Loading…
Add table
Add a link
Reference in a new issue