Skip to content

Commit f4b8017

Browse files
committed
[19.0][MIG] fs_storage Migration 19.0
1 parent ab67d11 commit f4b8017

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

fs_storage/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
{
66
"name": "Filesystem Storage Backend",
77
"summary": "Implement the concept of Storage with amazon S3, sftp...",
8-
"version": "18.0.2.0.1",
8+
"version": "19.0.1.0.0",
99
"category": "FS Storage",
1010
"website": "https://github.com/OCA/storage",
1111
"author": " ACSONE SA/NV, Odoo Community Association (OCA)",
1212
"license": "LGPL-3",
1313
"development_status": "Beta",
14-
"installable": False,
14+
"installable": True,
1515
"depends": ["base", "base_sparse_field", "server_environment"],
1616
"data": [
1717
"views/fs_storage_view.xml",

fs_storage/models/fs_storage.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,10 @@ def __init__(self, env, ids=(), prefetch_ids=()):
189189
"* List File : List all files from root directory",
190190
)
191191

192-
_sql_constraints = [
193-
(
194-
"code_uniq",
195-
"unique(code)",
196-
"The code must be unique",
197-
),
198-
]
192+
_uniq_code = models.Constraint(
193+
'unique(code)',
194+
'The code must be unique',
195+
)
199196

200197
_server_env_section_name_field = "code"
201198

fs_storage/tests/test_fs_storage.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ def test_ensure_one_fs_by_record(self):
8282
for i in range(4):
8383
backend_ids.append(
8484
self.backend.create(
85-
{"name": f"name{i}", "directory_path": f"{i}", "code": f"code{i}"}
85+
{
86+
"name": f"name{i}",
87+
"directory_path": f"{i}",
88+
"code": f"code{i}",
89+
"protocol": "odoofs",
90+
}
8691
).id
8792
)
8893
records = self.backend.browse(backend_ids)

requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)