diff --git a/base_fileurl_field/README.rst b/base_fileurl_field/README.rst new file mode 100644 index 0000000..d079dda --- /dev/null +++ b/base_fileurl_field/README.rst @@ -0,0 +1,37 @@ +Base FileURL Field +================== + +This module adds a new field type FileURL to odoo. +FileURL is an extension of field type Binary, with the aim to store its +value on any kind external storage. +It's been built with the focus on Amazon S3 but could be used with +other storage solution as long as it extends the functionaly of +base_attachment_object_storage. + +Usage +----- + +FileURL fields is intended to store Binary data on an external storage + with the possibility to be accessed outside of odoo. + +:param storage_location: Required external storage that must be + activated on the system (cf base_attachment_storage) + +:param storage_path: Path to be used as a prefix to the filename in the + storage solution (must be used with filename) + +:param filename: Field on the same model which stores the filename. + Will be used to set fname on ir.attachment and, if storage_path is + defined, will be passed to force the storage key. + +Limitations / Issues +-------------------- + +* Filename must be stored in a separate field on the same model defining a FileURL field. +* While using storage_path and filename attributes, there's a risk existing storage object + are overwritten if files with the same filename are added on different records. + +Example +------- + +cf `test_base_fileurl_field` module in https://github.com/camptocamp/odoo-cloud-platform diff --git a/base_fileurl_field/__manifest__.py b/base_fileurl_field/__manifest__.py index 2f1f48e..7445e68 100644 --- a/base_fileurl_field/__manifest__.py +++ b/base_fileurl_field/__manifest__.py @@ -3,16 +3,10 @@ { "name": "Base FileURL Field", "summary": "Implements of FileURL type fields", - "category": "Technical Settings", - "description": """ - This module adds a new field type FileURL to odoo. - FileURL is an extension of field type Binary, with the aim to store its - value on any kind external storage. - It's been built with the focus on Amazon S3 but could be used with - other storage solution as long as it extends the functionaly of - base_attachment_object_storage. - """, "version": "12.0.1.0.0", + "category": "Technical Settings", + 'author': 'Camptocamp, Odoo Community Association (OCA)', + 'license': 'AGPL-3', "depends": [ "base_attachment_object_storage", ], diff --git a/test_base_fileurl_field/README.rst b/test_base_fileurl_field/README.rst new file mode 100644 index 0000000..0061d73 --- /dev/null +++ b/test_base_fileurl_field/README.rst @@ -0,0 +1,4 @@ +Test Base FileURL Field +======================= + +This module serves as implementation example for `base_fileurl_field` and to run its tests. diff --git a/test_base_fileurl_field/__manifest__.py b/test_base_fileurl_field/__manifest__.py index 146cdd5..fecd344 100644 --- a/test_base_fileurl_field/__manifest__.py +++ b/test_base_fileurl_field/__manifest__.py @@ -2,9 +2,11 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) { 'name': 'test base fileurl fields', + 'summary': """A module to verify fileurl field.""", 'version': '12.0.1.0.0', 'category': 'Tests', - 'description': """A module to verify fileurl field.""", + 'author': 'Camptocamp,Odoo Community Association (OCA)', + 'license': 'AGPL-3', 'depends': [ 'base_fileurl_field' ], diff --git a/test_base_fileurl_field/views/res_users.xml b/test_base_fileurl_field/views/res_users.xml index 421196f..ffb5675 100644 --- a/test_base_fileurl_field/views/res_users.xml +++ b/test_base_fileurl_field/views/res_users.xml @@ -15,4 +15,4 @@ - \ No newline at end of file +