diff --git a/fs_file_demo/README.rst b/fs_file_demo/README.rst new file mode 100644 index 0000000000..447be0274e --- /dev/null +++ b/fs_file_demo/README.rst @@ -0,0 +1,88 @@ +============ +Fs File Demo +============ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c4bae92ca8f3924928cb362b7446fe66de31918004c2743963a83247b0746345 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |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-OCA%2Fstorage-lightgray.png?logo=github + :target: https://github.com/OCA/storage/tree/18.0/fs_file_demo + :alt: OCA/storage +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/storage-18-0/storage-18-0-fs_file_demo + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This addon is a demo addon for ``fs_file``. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Go into Settings > Technical > Fs File to create a new record of model +``fs.file``, which contains a FSFile record. + +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 +------- + +* ACSONE SA/NV + +Contributors +------------ + +Laurent Mignon Marie Lejeune + + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/storage `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fs_file_demo/__init__.py b/fs_file_demo/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/fs_file_demo/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/fs_file_demo/__manifest__.py b/fs_file_demo/__manifest__.py new file mode 100644 index 0000000000..7ba217727e --- /dev/null +++ b/fs_file_demo/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Fs File Demo", + "summary": """Demo addon for fs_file and fs_image""", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/storage", + "depends": [ + "fs_file", + "fs_image", + ], + "data": [ + "security/fs_file.xml", + "views/fs_file.xml", + ], + "demo": [], + "development_status": "Alpha", +} diff --git a/fs_file_demo/i18n/es.po b/fs_file_demo/i18n/es.po new file mode 100644 index 0000000000..3aafef6325 --- /dev/null +++ b/fs_file_demo/i18n/es.po @@ -0,0 +1,77 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_file_demo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-29 00:15+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__file +msgid "File" +msgstr "Archivo" + +#. module: fs_file_demo +#: model:ir.actions.act_window,name:fs_file_demo.fs_file_act_window +#: model:ir.model,name:fs_file_demo.model_fs_file +#: model:ir.ui.menu,name:fs_file_demo.fs_file_menu +msgid "Fs File" +msgstr "Archivo Fs" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_1920 +msgid "Image" +msgstr "Imagen" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_128 +msgid "Image 128" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_uid +msgid "Last Updated by" +msgstr "Última Actualización por" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_date +msgid "Last Updated on" +msgstr "Última Actualización el" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__name +msgid "Name" +msgstr "Nombre" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" diff --git a/fs_file_demo/i18n/fs_file_demo.pot b/fs_file_demo/i18n/fs_file_demo.pot new file mode 100644 index 0000000000..84e77198bf --- /dev/null +++ b/fs_file_demo/i18n/fs_file_demo.pot @@ -0,0 +1,71 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_file_demo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_uid +msgid "Created by" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_date +msgid "Created on" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__display_name +msgid "Display Name" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__file +msgid "File" +msgstr "" + +#. module: fs_file_demo +#: model:ir.actions.act_window,name:fs_file_demo.fs_file_act_window +#: model:ir.model,name:fs_file_demo.model_fs_file +#: model:ir.ui.menu,name:fs_file_demo.fs_file_menu +msgid "Fs File" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__id +msgid "ID" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_1920 +msgid "Image" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_128 +msgid "Image 128" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_date +msgid "Last Updated on" +msgstr "" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__name +msgid "Name" +msgstr "" diff --git a/fs_file_demo/i18n/it.po b/fs_file_demo/i18n/it.po new file mode 100644 index 0000000000..9339df4df6 --- /dev/null +++ b/fs_file_demo/i18n/it.po @@ -0,0 +1,77 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_file_demo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-04-29 08:35+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__file +msgid "File" +msgstr "File" + +#. module: fs_file_demo +#: model:ir.actions.act_window,name:fs_file_demo.fs_file_act_window +#: model:ir.model,name:fs_file_demo.model_fs_file +#: model:ir.ui.menu,name:fs_file_demo.fs_file_menu +msgid "Fs File" +msgstr "File FS" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__id +msgid "ID" +msgstr "ID" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_1920 +msgid "Image" +msgstr "Immagine" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__fs_image_128 +msgid "Image 128" +msgstr "Immagine 128" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: fs_file_demo +#: model:ir.model.fields,field_description:fs_file_demo.field_fs_file__name +msgid "Name" +msgstr "Nome" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/fs_file_demo/models/__init__.py b/fs_file_demo/models/__init__.py new file mode 100644 index 0000000000..e5b23f8e9a --- /dev/null +++ b/fs_file_demo/models/__init__.py @@ -0,0 +1 @@ +from . import fs_file diff --git a/fs_file_demo/models/fs_file.py b/fs_file_demo/models/fs_file.py new file mode 100644 index 0000000000..b03e84909f --- /dev/null +++ b/fs_file_demo/models/fs_file.py @@ -0,0 +1,26 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + +from odoo.addons.fs_file import fields as fs_fields +from odoo.addons.fs_image import fields as fs_image_fields + + +class FsFile(models.Model): + _name = "fs.file" + _description = "Fs File" + + name = fields.Char() + file = fs_fields.FSFile(string="File") + + fs_image_1920 = fs_image_fields.FSImage( + string="Image", max_width=1920, max_height=1920 + ) + fs_image_128 = fs_image_fields.FSImage( + string="Image 128", + max_width=128, + max_height=128, + related="fs_image_1920", + store=True, + ) diff --git a/fs_file_demo/pyproject.toml b/fs_file_demo/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/fs_file_demo/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/fs_file_demo/readme/CONTRIBUTORS.md b/fs_file_demo/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..6108ddde4c --- /dev/null +++ b/fs_file_demo/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +Laurent Mignon \<\> Marie Lejeune +\<\> diff --git a/fs_file_demo/readme/DESCRIPTION.md b/fs_file_demo/readme/DESCRIPTION.md new file mode 100644 index 0000000000..f1e3d3cedd --- /dev/null +++ b/fs_file_demo/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This addon is a demo addon for `fs_file`. diff --git a/fs_file_demo/readme/USAGE.md b/fs_file_demo/readme/USAGE.md new file mode 100644 index 0000000000..23a982975a --- /dev/null +++ b/fs_file_demo/readme/USAGE.md @@ -0,0 +1,2 @@ +Go into Settings \> Technical \> Fs File to create a new record of model +`fs.file`, which contains a FSFile record. diff --git a/fs_file_demo/security/fs_file.xml b/fs_file_demo/security/fs_file.xml new file mode 100644 index 0000000000..3cd13d61b4 --- /dev/null +++ b/fs_file_demo/security/fs_file.xml @@ -0,0 +1,14 @@ + + + + + fs.file default access + + + + + + + + diff --git a/fs_file_demo/static/description/icon.png b/fs_file_demo/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/fs_file_demo/static/description/icon.png differ diff --git a/fs_file_demo/static/description/index.html b/fs_file_demo/static/description/index.html new file mode 100644 index 0000000000..737b1e01b8 --- /dev/null +++ b/fs_file_demo/static/description/index.html @@ -0,0 +1,434 @@ + + + + + +Fs File Demo + + + +
+

Fs File Demo

+ + +

Alpha License: AGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

+

This addon is a demo addon for fs_file.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Usage

+

Go into Settings > Technical > Fs File to create a new record of model +fs.file, which contains a FSFile record.

+
+
+

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

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+

Laurent Mignon <laurent.mignon@acsone.eu> Marie Lejeune +<marie.lejeune@acsone.eu>

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/storage project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/fs_file_demo/views/fs_file.xml b/fs_file_demo/views/fs_file.xml new file mode 100644 index 0000000000..c46339abe7 --- /dev/null +++ b/fs_file_demo/views/fs_file.xml @@ -0,0 +1,50 @@ + + + + + fs.file.form (in fs_file_demo) + fs.file + +
+
+ + + + + + + + + + + + + fs.file.list (in fs_file_demo) + fs.file + + + + + + + + + Fs File + fs.file + list,form + [] + {} + + + + Fs File + + + + + diff --git a/test-requirements.txt b/test-requirements.txt index e63f876677..95fa917a24 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,4 @@ odoo_test_helper requests_mock vcrpy-unittest s3fs>=2025.3.0 +odoo-addon-fs_image @ git+https://github.com/OCA/storage.git@refs/pull/446/head#subdirectory=fs_image