From 92000aa9329f0a1f0b355adfbad826c09babc35d Mon Sep 17 00:00:00 2001 From: KNVx Date: Tue, 18 Jun 2024 17:12:19 +0200 Subject: [PATCH 1/3] [ADD] tools_mimetypes_extension --- tools_mimetypes_extension/README.rst | 63 +++ tools_mimetypes_extension/__init__.py | 1 + tools_mimetypes_extension/__manifest__.py | 15 + tools_mimetypes_extension/models/__init__.py | 1 + tools_mimetypes_extension/models/mimetypes.py | 437 ++++++++++++++++++ .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 1 + .../static/description/icon.png | Bin 0 -> 6342 bytes .../static/description/index.html | 420 +++++++++++++++++ 9 files changed, 941 insertions(+) create mode 100644 tools_mimetypes_extension/README.rst create mode 100644 tools_mimetypes_extension/__init__.py create mode 100644 tools_mimetypes_extension/__manifest__.py create mode 100644 tools_mimetypes_extension/models/__init__.py create mode 100644 tools_mimetypes_extension/models/mimetypes.py create mode 100644 tools_mimetypes_extension/readme/CONTRIBUTORS.rst create mode 100644 tools_mimetypes_extension/readme/DESCRIPTION.rst create mode 100644 tools_mimetypes_extension/static/description/icon.png create mode 100644 tools_mimetypes_extension/static/description/index.html diff --git a/tools_mimetypes_extension/README.rst b/tools_mimetypes_extension/README.rst new file mode 100644 index 000000000..5e017fcb1 --- /dev/null +++ b/tools_mimetypes_extension/README.rst @@ -0,0 +1,63 @@ +========================= +Tools mimetypes extension +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4b68b8b8182323f53e3fdb17ef17999784ce96f5d117237669d95829646abbbb + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-NuoBiT%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/NuoBiT/odoo-addons/tree/14.0/tools_mimetypes_extension + :alt: NuoBiT/odoo-addons + +|badge1| |badge2| |badge3| + +This module extend tools/mimetypes.py + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* NuoBiT Solutions +* S.L. + +Contributors +~~~~~~~~~~~~ + +* `NuoBiT `__: + + * Kilian Niubo + +Maintainers +~~~~~~~~~~~ + +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/tools_mimetypes_extension/__init__.py b/tools_mimetypes_extension/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/tools_mimetypes_extension/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/tools_mimetypes_extension/__manifest__.py b/tools_mimetypes_extension/__manifest__.py new file mode 100644 index 000000000..328343d89 --- /dev/null +++ b/tools_mimetypes_extension/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright NuoBiT Solutions - Kilian Niubo +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +{ + "name": "Tools mimetypes extension", + "author": "NuoBiT Solutions, S.L.", + "category": "Tools", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "website": "https://github.com/nuobit/odoo-addons", + "depends": [], + "data": [], + "installable": True, +} +# modificar a tools mimetypes extension diff --git a/tools_mimetypes_extension/models/__init__.py b/tools_mimetypes_extension/models/__init__.py new file mode 100644 index 000000000..1a9abe7e3 --- /dev/null +++ b/tools_mimetypes_extension/models/__init__.py @@ -0,0 +1 @@ +from . import mimetypes diff --git a/tools_mimetypes_extension/models/mimetypes.py b/tools_mimetypes_extension/models/mimetypes.py new file mode 100644 index 000000000..1a248f4c0 --- /dev/null +++ b/tools_mimetypes_extension/models/mimetypes.py @@ -0,0 +1,437 @@ +# Copyright NuoBiT Solutions - Kilian Niubo +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) +from odoo import _ +from odoo.exceptions import ValidationError +from odoo.tools import mimetypes + +_mimetype_file_extension = { + "application/atom+xml": ".atom", + "application/ecmascript": ".es", + "application/epub+zip": ".epub", + "application/gzip": ".gz", + "application/java-archive": ".jar", + "application/javascript": ".js", + "application/json": ".json", + "application/ld+json": ".jsonld", + "application/mac-binhex40": ".hqx", + "application/msword": ".doc", + "application/octet-stream": ".bin", + "application/ogg": ".ogx", + "application/pdf": ".pdf", + "application/postscript": ".ps", + "application/rtf": ".rtf", + "application/smil+xml": ".smi", + "application/vnd.amazon.ebook": ".azw", + "application/vnd.apple.installer+xml": ".mpkg", + "application/vnd.apple.mpegurl": ".m3u8", + "application/vnd.google-earth.kml+xml": ".kml", + "application/vnd.google-earth.kmz": ".kmz", + "application/vnd.mozilla.xul+xml": ".xul", + "application/vnd.ms-excel": ".xls", + "application/vnd.ms-powerpoint": ".ppt", + "application/vnd.oasis.opendocument.presentation": ".odp", + "application/vnd.oasis.opendocument.spreadsheet": ".ods", + "application/vnd.oasis.opendocument.text": ".odt", + "application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx", + "application/vnd.rar": ".rar", + "application/vnd.wap.wmlc": ".wmlc", + "application/x-7z-compressed": ".7z", + "application/x-7z": ".7z", + "application/x-ace-compressed": ".ace", + "application/x-ace": ".ace", + "application/x-alz": ".alz", + "application/x-apple-diskimage": ".dmg", + "application/x-ar": ".a", + "application/x-arc": ".arc", + "application/x-archive": ".a", + "application/x-arj": ".arj", + "application/x-awk": ".awk", + "application/x-bash": ".sh", + "application/x-bat": ".bat", + "application/x-bin": ".bin", + "application/x-binhex40": ".hqx", + "application/x-boo": ".boo", + "application/x-brotli": ".br", + "application/x-bzip-compressed-tar": ".tar.bz2", + "application/x-bzip": ".bz", + "application/x-bzip2": ".bz2", + "application/x-c++header": ".hpp", + "application/x-c++source": ".cpp", + "application/x-cab": ".cab", + "application/x-cdf": ".cdf", + "application/x-cheader": ".h", + "application/x-com": ".com", + "application/x-compress-compressed-tar": ".tar.Z", + "application/x-compress": ".Z", + "application/x-cpio": ".cpio", + "application/x-csh": ".csh", + "application/x-csharp": ".cs", + "application/x-csource": ".c", + "application/x-css": ".css", + "application/x-dar": ".dar", + "application/x-dash": ".sh", + "application/x-deb": ".deb", + "application/x-debian-package": ".deb", + "application/x-diskcopy": ".dsk", + "application/x-dms": ".dms", + "application/x-dvi": ".dvi", + "application/x-elf": ".elf", + "application/x-envoy": ".evy", + "application/x-eva": ".eva", + "application/x-fdisk": ".fdisk", + "application/x-font-eot": ".eot", + "application/x-font-opentype": ".otf", + "application/x-font-otf": ".otf", + "application/x-font-truetype": ".ttf", + "application/x-font-ttf": ".ttf", + "application/x-font-woff": ".woff", + "application/x-font-woff2": ".woff2", + "application/x-fractals": ".fif", + "application/x-freearc": ".arc", + "application/x-gtar": ".gtar", + "application/x-gzip-compressed-tar": ".tar.gz", + "application/x-gzip": ".gz", + "application/x-ha": ".ha", + "application/x-html": ".html", + "application/x-httpd-imap": ".imap", + "application/x-httpd-php-source": ".phps", + "application/x-httpd-php": ".php", + "application/x-httpd-php3": ".php3", + "application/x-httpd-php4": ".php4", + "application/x-httpd-php5": ".php5", + "application/x-hyper-v-vhd": ".vhd", + "application/x-iso": ".iso", + "application/x-iso9660-image": ".iso", + "application/x-iso9660": ".iso", + "application/x-java-jnlp-file": ".jnlp", + "application/x-java-source": ".java", + "application/x-java": ".java", + "application/x-javascript": ".js", + "application/x-latex": ".latex", + "application/x-lha": ".lha", + "application/x-lrzip-compressed-tar": ".tar.lrz", + "application/x-lrzip": ".lrz", + "application/x-lz4": ".lz4", + "application/x-lzh": ".lzh", + "application/x-lzip-compressed-tar": ".tar.lz", + "application/x-lzip": ".lz", + "application/x-lzma-compressed-tar": ".tar.lzma", + "application/x-lzma-compressed": ".xz", + "application/x-lzma": ".lzma", + "application/x-lzop-compressed-tar": ".tar.lzo", + "application/x-lzop": ".lzo", + "application/x-macbinary": ".bin", + "application/x-macbinhex40": ".hqx", + "application/x-mathcad": ".mcd", + "application/x-mplayer2": ".asx", + "application/x-ms-dos-executable": ".exe", + "application/x-ms-installer": ".msi", + "application/x-msaccess": ".mdb", + "application/x-msdos-program": ".exe", + "application/x-msdownload": ".exe", + "application/x-msi": ".msi", + "application/x-msmetafile": ".wmf", + "application/x-msmoney": ".mny", + "application/x-mspowerpoint": ".ppt", + "application/x-mspublisher": ".pub", + "application/x-mswrite": ".wri", + "application/x-netcdf": ".nc", + "application/x-ns-proxy-autoconfig": ".pac", + "application/x-pagemaker": ".pmd", + "application/x-pdf": ".pdf", + "application/x-pe": ".exe", + "application/x-perl": ".pl", + "application/x-php": ".php", + "application/x-pilot": ".prc", + "application/x-pkcs12": ".p12", + "application/x-pkcs7-certificates": ".p7b", + "application/x-pkcs7-certreqresp": ".p7r", + "application/x-python": ".py", + "application/x-qemu-img": ".qcow2", + "application/x-rar-compressed": ".rar", + "application/x-rar": ".rar", + "application/x-redhat-package-manager": ".rpm", + "application/x-research-info-systems": ".ris", + "application/x-rpm": ".rpm", + "application/x-ruby": ".rb", + "application/x-safari-safariextz": ".safariextz", + "application/x-sas-access": ".sas7bdat", + "application/x-sas-audit": ".sl", + "application/x-sas-backup": ".sbk", + "application/x-sas-catalog": ".sas7bcat", + "application/x-sas-data": ".sas7bdat", + "application/x-sas-metadata": ".sas7bcat", + "application/x-sas-template": ".sas7bdat", + "application/x-sas-xpt": ".xpt", + "application/x-sas": ".sas", + "application/x-sh": ".sh", + "application/x-shar": ".shar", + "application/x-shellscript": ".sh", + "application/x-shockwave-flash": ".swf", + "application/x-silverlight-app": ".xap", + "application/x-sit": ".sit", + "application/x-snappy-compressed-tar": ".tar.sz", + "application/x-snappy-framed": ".sz", + "application/x-snappy": ".snappy", + "application/x-sqlite3": ".sqlite3", + "application/x-stuffit": ".sit", + "application/x-stuffitx": ".sitx", + "application/x-subrip": ".srt", + "application/x-sv4cpio": ".sv4cpio", + "application/x-sv4crc": ".sv4crc", + "application/x-t3vm-image": ".t3", + "application/x-tads": ".gam", + "application/x-tar-bzip2": ".tar.bz2", + "application/x-tar-compressed": ".tar.gz", + "application/x-tar-lzop": ".tar.lzo", + "application/x-tar-xz": ".tar.xz", + "application/x-tar-zstd": ".tar.zst", + "application/x-tar": ".tar", + "application/x-tcl": ".tcl", + "application/x-tex": ".tex", + "application/x-texinfo": ".texi", + "application/x-tgif": ".obj", + "application/x-udf": ".udf", + "application/x-ustar": ".ustar", + "application/x-uue": ".uue", + "application/x-vhd": ".vhd", + "application/x-vhdx": ".vhdx", + "application/x-virtualbox-vdi": ".vdi", + "application/x-virtualbox-vhd": ".vhd", + "application/x-virtualbox-vmdk": ".vmdk", + "application/x-vmdk": ".vmdk", + "application/x-vmware-vmdk": ".vmdk", + "application/x-wais-source": ".src", + "application/x-web-app-manifest+json": ".webapp", + "application/x-www-form-urlencoded": ".urlencoded", + "application/x-x509-ca-cert": ".crt", + "application/x-xar": ".xar", + "application/x-xcf": ".xcf", + "application/x-xfig": ".fig", + "application/x-xliff+xml": ".xlf", + "application/x-xpinstall": ".xpi", + "application/x-xz-compressed-tar": ".tar.xz", + "application/x-xz": ".xz", + "application/x-zmachine": ".z1", + "application/x-zoo": ".zoo", + "application/x-zopfli-compressed-tar": ".tar.zopfli", + "application/x-zopfli": ".zopfli", + "application/x-zpaq-compressed-tar": ".tar.zpaq", + "application/x-zpaq": ".zpaq", + "application/x-zstd-compressed-tar": ".tar.zst", + "application/x-zstd": ".zst", + "application/xaml+xml": ".xaml", + "application/xcap-diff+xml": ".xdf", + "application/xenc+xml": ".xenc", + "application/xhtml+xml": ".xhtml", + "application/xml-dtd": ".dtd", + "application/xml": ".xml", + "application/xop+xml": ".xop", + "application/xproc+xml": ".xpl", + "application/xslt+xml": ".xslt", + "application/xspf+xml": ".xspf", + "application/xv+xml": ".mxml", + "application/yang": ".yang", + "application/yin+xml": ".yin", + "application/zip": ".zip", + "audio/3gpp": ".3gp", + "audio/3gpp2": ".3g2", + "audio/aac": ".aac", + "audio/adpcm": ".adp", + "audio/basic": ".au", + "audio/midi": ".midi", + "audio/mp4": ".mp4a", + "audio/mpeg": ".mp3", + "audio/ogg": ".oga", + "audio/opus": ".opus", + "audio/s3m": ".s3m", + "audio/silk": ".sil", + "audio/vnd.dece.audio": ".uva", + "audio/vnd.digital-winds": ".eol", + "audio/vnd.dra": ".dra", + "audio/vnd.dts.hd": ".dtshd", + "audio/vnd.dts": ".dts", + "audio/vnd.lucent.voice": ".lvp", + "audio/vnd.ms-playready.media.pya": ".pya", + "audio/vnd.nuera.ecelp4800": ".ecelp4800", + "audio/vnd.nuera.ecelp7470": ".ecelp7470", + "audio/vnd.nuera.ecelp9600": ".ecelp9600", + "audio/wav": ".wav", + "audio/webm": ".weba", + "audio/x-aac": ".aac", + "audio/x-aiff": ".aif", + "audio/x-caf": ".caf", + "audio/x-flac": ".flac", + "audio/x-matroska": ".mka", + "audio/x-mpegurl": ".m3u", + "audio/x-ms-wax": ".wax", + "audio/x-ms-wma": ".wma", + "audio/x-pn-realaudio-plugin": ".rmp", + "audio/x-pn-realaudio": ".ram", + "audio/x-wav": ".wav", + "audio/xm": ".xm", + "chemical/x-cdx": ".cdx", + "chemical/x-cif": ".cif", + "chemical/x-cmdf": ".cmdf", + "chemical/x-cml": ".cml", + "chemical/x-csml": ".csml", + "chemical/x-xyz": ".xyz", + "font/otf": ".otf", + "font/ttf": ".ttf", + "font/woff": ".woff", + "font/woff2": ".woff2", + "image/bmp": ".bmp", + "image/cgm": ".cgm", + "image/g3fax": ".g3", + "image/gif": ".gif", + "image/ief": ".ief", + "image/jpeg": ".jpeg", + "image/ktx": ".ktx", + "image/png": ".png", + "image/prs.btif": ".btif", + "image/sgi": ".sgi", + "image/svg+xml": ".svg", + "image/tiff": ".tiff", + "image/vnd.adobe.photoshop": ".psd", + "image/vnd.dece.graphic": ".uvi", + "image/vnd.djvu": ".djvu", + "image/vnd.dvb.subtitle": ".sub", + "image/vnd.dwg": ".dwg", + "image/vnd.dxf": ".dxf", + "image/vnd.fastbidsheet": ".fbs", + "image/vnd.fpx": ".fpx", + "image/vnd.fst": ".fst", + "image/vnd.fujixerox.edmics-mmr": ".mmr", + "image/vnd.fujixerox.edmics-rlc": ".rlc", + "image/vnd.microsoft.icon": ".ico", + "image/vnd.ms-modi": ".mdi", + "image/vnd.ms-photo": ".wdp", + "image/vnd.net-fpx": ".npx", + "image/vnd.wap.wbmp": ".wbmp", + "image/vnd.xiff": ".xif", + "image/webp": ".webp", + "image/x-3ds": ".3ds", + "image/x-cmu-raster": ".ras", + "image/x-cmx": ".cmx", + "image/x-freehand": ".fh", + "image/x-icon": ".ico", + "image/x-mrsid-image": ".sid", + "image/x-pcx": ".pcx", + "image/x-pict": ".pic", + "image/x-portable-anymap": ".pnm", + "image/x-portable-bitmap": ".pbm", + "image/x-portable-graymap": ".pgm", + "image/x-portable-pixmap": ".ppm", + "image/x-rgb": ".rgb", + "image/x-tga": ".tga", + "image/x-xbitmap": ".xbm", + "image/x-xpixmap": ".xpm", + "image/x-xwindowdump": ".xwd", + "message/rfc822": ".eml", + "model/iges": ".igs", + "model/mesh": ".msh", + "model/vnd.collada+xml": ".dae", + "model/vnd.dwf": ".dwf", + "model/vnd.gdl": ".gdl", + "model/vnd.gtw": ".gtw", + "model/vnd.mts": ".mts", + "model/vnd.vtu": ".vtu", + "model/vrml": ".wrl", + "model/x3d+binary": ".x3db", + "model/x3d+vrml": ".x3dv", + "model/x3d+xml": ".x3d", + "text/cache-manifest": ".appcache", + "text/calendar": ".ics", + "text/css": ".css", + "text/csv": ".csv", + "text/html": ".html", + "text/javascript": ".js", + "text/n3": ".n3", + "text/plain": ".txt", + "text/prs.lines.tag": ".dsc", + "text/richtext": ".rtx", + "text/sgml": ".sgml", + "text/tab-separated-values": ".tsv", + "text/troff": ".t", + "text/turtle": ".ttl", + "text/uri-list": ".uri", + "text/vcard": ".vcard", + "text/vnd.curl.dcurl": ".dcurl", + "text/vnd.curl.mcurl": ".mcurl", + "text/vnd.curl.scurl": ".scurl", + "text/vnd.curl": ".curl", + "text/vnd.dvb.subtitle": ".sub", + "text/vnd.fly": ".fly", + "text/vnd.fmi.flexstor": ".flx", + "text/vnd.graphviz": ".gv", + "text/vnd.in3d.3dml": ".3dml", + "text/vnd.in3d.spot": ".spot", + "text/vnd.sun.j2me.app-descriptor": ".jad", + "text/vnd.wap.wml": ".wml", + "text/vnd.wap.wmlscript": ".wmls", + "text/x-asm": ".s", + "text/x-c": ".c", + "text/x-fortran": ".f", + "text/x-java-source": ".java", + "text/x-nfo": ".nfo", + "text/x-opml": ".opml", + "text/x-pascal": ".p", + "text/x-setext": ".etx", + "text/x-sfv": ".sfv", + "text/x-uuencode": ".uu", + "text/x-vcalendar": ".vcs", + "text/x-vcard": ".vcf", + "text/xml": ".xml", + "video/3gpp": ".3gp", + "video/3gpp2": ".3g2", + "video/h261": ".h261", + "video/h263": ".h263", + "video/h264": ".h264", + "video/jpeg": ".jpgv", + "video/jpm": ".jpm", + "video/mj2": ".mj2", + "video/mp2t": ".ts", + "video/mp4": ".mp4", + "video/mpeg": ".mpeg", + "video/ogg": ".ogv", + "video/quicktime": ".qt", + "video/vnd.dece.hd": ".uvh", + "video/vnd.dece.mobile": ".uvm", + "video/vnd.dece.pd": ".uvp", + "video/vnd.dece.sd": ".uvs", + "video/vnd.dece.video": ".uvv", + "video/vnd.dvb.file": ".dvb", + "video/vnd.fvt": ".fvt", + "video/vnd.mpegurl": ".mxu", + "video/vnd.ms-playready.media.pyv": ".pyv", + "video/vnd.uvvu.mp4": ".uvu", + "video/vnd.vivo": ".viv", + "video/webm": ".webm", + "video/x-f4v": ".f4v", + "video/x-fli": ".fli", + "video/x-flv": ".flv", + "video/x-m4v": ".m4v", + "video/x-matroska": ".mkv", + "video/x-mng": ".mng", + "video/x-ms-asf": ".asf", + "video/x-ms-vob": ".vob", + "video/x-ms-wm": ".wm", + "video/x-ms-wmv": ".wmv", + "video/x-ms-wmx": ".wmx", + "video/x-ms-wvx": ".wvx", + "video/x-msvideo": ".avi", + "video/x-sgi-movie": ".movie", + "video/x-smv": ".smv", + "x-conference/x-cooltalk": ".ice", +} + + +def guess_extension(mimetype): + if mimetype not in _mimetype_file_extension: + raise ValidationError(_("Mimetype %s is not mapped." % mimetype)) + return _mimetype_file_extension[mimetype] + + +mimetypes.guess_extension = guess_extension diff --git a/tools_mimetypes_extension/readme/CONTRIBUTORS.rst b/tools_mimetypes_extension/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..d018d7d8f --- /dev/null +++ b/tools_mimetypes_extension/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `NuoBiT `__: + + * Kilian Niubo diff --git a/tools_mimetypes_extension/readme/DESCRIPTION.rst b/tools_mimetypes_extension/readme/DESCRIPTION.rst new file mode 100644 index 000000000..69fa4280c --- /dev/null +++ b/tools_mimetypes_extension/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module extend tools/mimetypes.py diff --git a/tools_mimetypes_extension/static/description/icon.png b/tools_mimetypes_extension/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1cd641e792c30455187ca30940bc0f329ce8bbb0 GIT binary patch literal 6342 zcmd^^hf`C}*TzHWpfm-MZa|7OjYtjE(4`3pP0Eid3J8V{0s)mKJ<q zp^9|rp$mb~2}po9-@oIXJG(oxcjoS%d!O@s&d!Z9HP*e##KQyt0IurmK_64bp8pyH z9i^|ds>-JfbWVo4P{8GX*QeIfbjl2)kDfIG0ALvZuT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)Q05VbBm+t`9B_${w9F7WfM{Jvawk;HDc*{Sa_Sla|zqX!vbKV%>gB|z6BCc z8_bdnPnzloGP1I)!^5hnC6CLZUU`;nO2NF2)FaAkYhQL$Z58+`p75dj7RKse#Z!uacCm z0@|m~U!QZOdb|V~`ktFK4;lg_ZOCjFXeV4`jGj&bh7Q6BEyN8~yGd*JyzwFbIRaAf z#KG$rvQxWFvqwn`i6jBQ?6o+k+oOC)Gj9ChlgabiScr};b5|opxUYjCZOwmhjTj6W zFzJt_htTuopW4IRiQ}r0L}`w=pE{HN<@(9Hl11P5cHmN6A1F^sg2OWXcw<+q2x>I5 zq9Bu>PBob6#^vrr<|IC)m+zJpFRRcCVsqbspNybriu&!R=H^@RcG#aBGz9RH}ZI=>4 zi(m?IA?Vr$Q7?wN6ZW7H`S?3}K8=$7J5MjWKri=_igw1%J?0~*6e_Ii*1&23dGcF} z&=vaMgF!^veGQ1f$3k?WK5Jaw%==+Bb!tI6zQ68&-dQ3Orl+Tqh#Nt?dBEV_w^wkjY+qJ+X*NCMs%J-Lc4%}pKryM#O)O&9 un*HHVB-AlUN`suyDkKONktc!@Ievk;6wT20MOSqhE{1gM*SZGeqiYU literal 0 HcmV?d00001 diff --git a/tools_mimetypes_extension/static/description/index.html b/tools_mimetypes_extension/static/description/index.html new file mode 100644 index 000000000..fc7439f37 --- /dev/null +++ b/tools_mimetypes_extension/static/description/index.html @@ -0,0 +1,420 @@ + + + + + + +Tools mimetypes extension + + + +
+

Tools mimetypes extension

+ + +

Beta License: AGPL-3 NuoBiT/odoo-addons

+

This module extend tools/mimetypes.py

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • NuoBiT Solutions
  • +
  • S.L.
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + From 60273d550ba2d12b546ab8664a326bc986e7456f Mon Sep 17 00:00:00 2001 From: ??? Date: Mon, 30 Mar 2026 11:11:20 +0200 Subject: [PATCH 2/3] [IMP] tools_mimetypes_extension: pre-commit auto fixes --- tools_mimetypes_extension/README.rst | 16 ++++++++-------- tools_mimetypes_extension/__manifest__.py | 2 +- tools_mimetypes_extension/pyproject.toml | 3 +++ tools_mimetypes_extension/readme/CONTRIBUTORS.md | 2 ++ .../readme/CONTRIBUTORS.rst | 3 --- .../readme/{DESCRIPTION.rst => DESCRIPTION.md} | 0 .../static/description/index.html | 14 +++++++------- 7 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 tools_mimetypes_extension/pyproject.toml create mode 100644 tools_mimetypes_extension/readme/CONTRIBUTORS.md delete mode 100644 tools_mimetypes_extension/readme/CONTRIBUTORS.rst rename tools_mimetypes_extension/readme/{DESCRIPTION.rst => DESCRIPTION.md} (100%) diff --git a/tools_mimetypes_extension/README.rst b/tools_mimetypes_extension/README.rst index 5e017fcb1..e20631e97 100644 --- a/tools_mimetypes_extension/README.rst +++ b/tools_mimetypes_extension/README.rst @@ -17,7 +17,7 @@ Tools mimetypes extension :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-NuoBiT%2Fodoo--addons-lightgray.png?logo=github - :target: https://github.com/NuoBiT/odoo-addons/tree/14.0/tools_mimetypes_extension + :target: https://github.com/NuoBiT/odoo-addons/tree/18.0/tools_mimetypes_extension :alt: NuoBiT/odoo-addons |badge1| |badge2| |badge3| @@ -35,7 +35,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -43,21 +43,21 @@ Credits ======= Authors -~~~~~~~ +------- * NuoBiT Solutions * S.L. Contributors -~~~~~~~~~~~~ +------------ -* `NuoBiT `__: +- `NuoBiT `__: - * Kilian Niubo + - Kilian Niubo Maintainers -~~~~~~~~~~~ +----------- -This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. You are welcome to contribute. diff --git a/tools_mimetypes_extension/__manifest__.py b/tools_mimetypes_extension/__manifest__.py index 328343d89..7d8cd49bf 100644 --- a/tools_mimetypes_extension/__manifest__.py +++ b/tools_mimetypes_extension/__manifest__.py @@ -7,7 +7,7 @@ "category": "Tools", "version": "14.0.1.0.0", "license": "AGPL-3", - "website": "https://github.com/nuobit/odoo-addons", + "website": "https://github.com/NuoBiT/odoo-addons", "depends": [], "data": [], "installable": True, diff --git a/tools_mimetypes_extension/pyproject.toml b/tools_mimetypes_extension/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/tools_mimetypes_extension/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/tools_mimetypes_extension/readme/CONTRIBUTORS.md b/tools_mimetypes_extension/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..827f27baa --- /dev/null +++ b/tools_mimetypes_extension/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [NuoBiT](https://www.nuobit.com): + - Kilian Niubo \ diff --git a/tools_mimetypes_extension/readme/CONTRIBUTORS.rst b/tools_mimetypes_extension/readme/CONTRIBUTORS.rst deleted file mode 100644 index d018d7d8f..000000000 --- a/tools_mimetypes_extension/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,3 +0,0 @@ -* `NuoBiT `__: - - * Kilian Niubo diff --git a/tools_mimetypes_extension/readme/DESCRIPTION.rst b/tools_mimetypes_extension/readme/DESCRIPTION.md similarity index 100% rename from tools_mimetypes_extension/readme/DESCRIPTION.rst rename to tools_mimetypes_extension/readme/DESCRIPTION.md diff --git a/tools_mimetypes_extension/static/description/index.html b/tools_mimetypes_extension/static/description/index.html index fc7439f37..1ab757598 100644 --- a/tools_mimetypes_extension/static/description/index.html +++ b/tools_mimetypes_extension/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +369,7 @@

Tools mimetypes extension

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:4b68b8b8182323f53e3fdb17ef17999784ce96f5d117237669d95829646abbbb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 NuoBiT/odoo-addons

+

Beta License: AGPL-3 NuoBiT/odoo-addons

This module extend tools/mimetypes.py

Table of contents

@@ -388,7 +388,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -411,7 +411,7 @@

Contributors

Maintainers

-

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

You are welcome to contribute.

From 34a4e8b73d3cc3c77dd66e125ce8a0943189783d Mon Sep 17 00:00:00 2001 From: ??? Date: Mon, 30 Mar 2026 11:15:28 +0200 Subject: [PATCH 3/3] [MIG] tools_mimetypes_extension: Migration to 18.0 --- tools_mimetypes_extension/README.rst | 6 +++--- tools_mimetypes_extension/__manifest__.py | 7 +++---- tools_mimetypes_extension/models/mimetypes.py | 10 ++++++++-- tools_mimetypes_extension/readme/CONTRIBUTORS.md | 3 ++- .../static/description/index.html | 6 +++--- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/tools_mimetypes_extension/README.rst b/tools_mimetypes_extension/README.rst index e20631e97..749ad30e6 100644 --- a/tools_mimetypes_extension/README.rst +++ b/tools_mimetypes_extension/README.rst @@ -45,15 +45,15 @@ Credits Authors ------- -* NuoBiT Solutions -* S.L. +* NuoBiT Solutions SL Contributors ------------ - `NuoBiT `__: - - Kilian Niubo + - Kilian Niubo kniubo@nuobit.com + - Deniz Gallo dgallo@nuobit.com Maintainers ----------- diff --git a/tools_mimetypes_extension/__manifest__.py b/tools_mimetypes_extension/__manifest__.py index 7d8cd49bf..f14b21b64 100644 --- a/tools_mimetypes_extension/__manifest__.py +++ b/tools_mimetypes_extension/__manifest__.py @@ -1,15 +1,14 @@ # Copyright NuoBiT Solutions - Kilian Niubo +# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) { "name": "Tools mimetypes extension", - "author": "NuoBiT Solutions, S.L.", + "author": "NuoBiT Solutions SL", "category": "Tools", - "version": "14.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/NuoBiT/odoo-addons", "depends": [], - "data": [], - "installable": True, } # modificar a tools mimetypes extension diff --git a/tools_mimetypes_extension/models/mimetypes.py b/tools_mimetypes_extension/models/mimetypes.py index 1a248f4c0..a59e838b2 100644 --- a/tools_mimetypes_extension/models/mimetypes.py +++ b/tools_mimetypes_extension/models/mimetypes.py @@ -1,4 +1,5 @@ # Copyright NuoBiT Solutions - Kilian Niubo +# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) from odoo import _ from odoo.exceptions import ValidationError @@ -32,7 +33,7 @@ "application/vnd.oasis.opendocument.presentation": ".odp", "application/vnd.oasis.opendocument.spreadsheet": ".ods", "application/vnd.oasis.opendocument.text": ".odt", - "application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx", + "application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx", # noqa: E501 "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx", "application/vnd.rar": ".rar", @@ -430,7 +431,12 @@ def guess_extension(mimetype): if mimetype not in _mimetype_file_extension: - raise ValidationError(_("Mimetype %s is not mapped." % mimetype)) + raise ValidationError( + _("Mimetype %(mimetype)s is not mapped.") + % { + "mimetype": mimetype, + } + ) return _mimetype_file_extension[mimetype] diff --git a/tools_mimetypes_extension/readme/CONTRIBUTORS.md b/tools_mimetypes_extension/readme/CONTRIBUTORS.md index 827f27baa..5d535bfca 100644 --- a/tools_mimetypes_extension/readme/CONTRIBUTORS.md +++ b/tools_mimetypes_extension/readme/CONTRIBUTORS.md @@ -1,2 +1,3 @@ - [NuoBiT](https://www.nuobit.com): - - Kilian Niubo \ + - Kilian Niubo + - Deniz Gallo diff --git a/tools_mimetypes_extension/static/description/index.html b/tools_mimetypes_extension/static/description/index.html index 1ab757598..43287dd3f 100644 --- a/tools_mimetypes_extension/static/description/index.html +++ b/tools_mimetypes_extension/static/description/index.html @@ -396,15 +396,15 @@

Credits

Authors

    -
  • NuoBiT Solutions
  • -
  • S.L.
  • +
  • NuoBiT Solutions SL

Contributors