odoo-addon-dms 16.0.1.8.0.5__py3-none-any.whl → 17.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/dms/README.rst +132 -78
- odoo/addons/dms/__manifest__.py +34 -16
- odoo/addons/dms/actions/file.xml +1 -3
- odoo/addons/dms/controllers/main.py +0 -34
- odoo/addons/dms/controllers/portal.py +178 -92
- odoo/addons/dms/data/onboarding_data.xml +77 -0
- odoo/addons/dms/demo/access_group.xml +3 -9
- odoo/addons/dms/i18n/de.po +13 -117
- odoo/addons/dms/i18n/dms.pot +137 -174
- odoo/addons/dms/i18n/es.po +15 -58
- odoo/addons/dms/i18n/fr.po +296 -450
- odoo/addons/dms/i18n/he_IL.po +13 -117
- odoo/addons/dms/i18n/it.po +15 -131
- odoo/addons/dms/i18n/nl.po +13 -117
- odoo/addons/dms/i18n/pt.po +13 -121
- odoo/addons/dms/i18n/pt_BR.po +28 -147
- odoo/addons/dms/i18n/ru.po +13 -117
- odoo/addons/dms/models/__init__.py +7 -1
- odoo/addons/dms/models/abstract_dms_mixin.py +1 -1
- odoo/addons/dms/models/access_groups.py +18 -11
- odoo/addons/dms/models/base.py +10 -2
- odoo/addons/dms/models/directory.py +46 -75
- odoo/addons/dms/models/{category.py → dms_category.py} +10 -42
- odoo/addons/dms/models/dms_file.py +125 -147
- odoo/addons/dms/models/dms_security_mixin.py +26 -22
- odoo/addons/dms/models/ir_attachment.py +0 -1
- odoo/addons/dms/models/ir_binary.py +19 -0
- odoo/addons/dms/models/mail_thread.py +2 -4
- odoo/addons/dms/models/mixins_thumbnail.py +13 -8
- odoo/addons/dms/models/onboarding_onboarding.py +16 -0
- odoo/addons/dms/models/onboarding_onboarding_step.py +50 -0
- odoo/addons/dms/models/res_company.py +22 -47
- odoo/addons/dms/models/res_config_settings.py +0 -1
- odoo/addons/dms/models/storage.py +4 -24
- odoo/addons/dms/models/tag.py +1 -1
- odoo/addons/dms/readme/CONFIGURE.md +59 -0
- odoo/addons/dms/readme/CONTRIBUTORS.md +14 -0
- odoo/addons/dms/readme/CREDITS.md +6 -0
- odoo/addons/dms/readme/DESCRIPTION.md +9 -0
- odoo/addons/dms/readme/INSTALL.md +4 -0
- odoo/addons/dms/readme/ROADMAP.md +19 -0
- odoo/addons/dms/readme/USAGE.md +11 -0
- odoo/addons/dms/security/security.xml +1 -0
- odoo/addons/dms/static/description/icon.png +0 -0
- odoo/addons/dms/static/description/icon.svg +4 -1
- odoo/addons/dms/static/description/index.html +133 -88
- odoo/addons/dms/static/description/portal_icon.svg +12 -0
- odoo/addons/dms/static/src/js/fields/{path_owl.esm.js → path_json/path_owl.esm.js} +22 -4
- odoo/addons/dms/static/src/js/fields/{path_owl.xml → path_json/path_owl.xml} +7 -4
- odoo/addons/dms/static/src/js/fields/preview_binary/preview_record.esm.js +47 -0
- odoo/addons/dms/static/src/js/{views/fields/binary → fields/preview_binary}/preview_record.xml +5 -4
- odoo/addons/dms/static/src/js/views/dms_file_upload.esm.js +155 -148
- odoo/addons/dms/static/src/js/views/file_kanban_controller.xml +0 -1
- odoo/addons/dms/static/src/js/views/file_kanban_record.esm.js +26 -27
- odoo/addons/dms/static/src/js/views/file_kanban_renderer.esm.js +1 -2
- odoo/addons/dms/static/src/js/views/file_kanban_renderer.xml +12 -16
- odoo/addons/dms/static/src/js/views/file_kanban_view.esm.js +11 -9
- odoo/addons/dms/static/src/js/views/file_list_controller.esm.js +1 -1
- odoo/addons/dms/static/src/js/views/file_list_renderer.xml +1 -7
- odoo/addons/dms/static/src/js/views/file_list_view.esm.js +11 -9
- odoo/addons/dms/static/src/js/views/search_panel.esm.js +9 -10
- odoo/addons/dms/static/src/models/attachment.esm.js +83 -82
- odoo/addons/dms/static/src/models/attachment_image.esm.js +30 -28
- odoo/addons/dms/static/src/models/attachment_viewer_viewable.esm.js +27 -25
- odoo/addons/dms/static/src/scss/directory_kanban.scss +28 -73
- odoo/addons/dms/static/src/scss/dms_common.scss +69 -0
- odoo/addons/dms/static/src/scss/file_kanban.scss +22 -34
- odoo/addons/dms/static/src/scss/portal.scss +12 -0
- odoo/addons/dms/static/tests/tours/dms_portal_tour.esm.js +46 -0
- odoo/addons/dms/{views/dms_portal_templates.xml → template/portal.xml} +13 -3
- odoo/addons/dms/tests/common.py +20 -4
- odoo/addons/dms/tests/data/mail01.eml +2 -2
- odoo/addons/dms/tests/data/mail02.eml +2 -2
- odoo/addons/dms/tests/test_benchmark.py +16 -21
- odoo/addons/dms/tests/test_directory.py +128 -40
- odoo/addons/dms/tests/test_file.py +112 -30
- odoo/addons/dms/tests/test_file_database.py +50 -24
- odoo/addons/dms/tests/test_portal.py +50 -37
- odoo/addons/dms/tests/test_storage_attachment.py +85 -63
- odoo/addons/dms/tests/test_storage_database.py +89 -35
- odoo/addons/dms/tools/file.py +63 -11
- odoo/addons/dms/views/dms_access_groups_views.xml +2 -17
- odoo/addons/dms/views/{category.xml → dms_category.xml} +4 -9
- odoo/addons/dms/views/{directory.xml → dms_directory.xml} +168 -176
- odoo/addons/dms/views/dms_file.xml +170 -191
- odoo/addons/dms/views/{tag.xml → dms_tag.xml} +50 -53
- odoo/addons/dms/views/menu.xml +52 -21
- odoo/addons/dms/views/res_config_settings.xml +31 -82
- odoo/addons/dms/views/storage.xml +7 -13
- odoo_addon_dms-17.0.1.0.0.2.dist-info/METADATA +257 -0
- {odoo_addon_dms-16.0.1.8.0.5.dist-info → odoo_addon_dms-17.0.1.0.0.2.dist-info}/RECORD +93 -95
- {odoo_addon_dms-16.0.1.8.0.5.dist-info → odoo_addon_dms-17.0.1.0.0.2.dist-info}/WHEEL +1 -1
- odoo_addon_dms-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
- odoo/addons/dms/i18n/fa.po +0 -2277
- odoo/addons/dms/i18n/fa_IR.po +0 -2277
- odoo/addons/dms/readme/CONFIGURE.rst +0 -40
- odoo/addons/dms/readme/CONTRIBUTORS.rst +0 -16
- odoo/addons/dms/readme/CREDITS.rst +0 -6
- odoo/addons/dms/readme/DESCRIPTION.rst +0 -6
- odoo/addons/dms/readme/INSTALL.rst +0 -9
- odoo/addons/dms/readme/ROADMAP.rst +0 -8
- odoo/addons/dms/readme/USAGE.rst +0 -8
- odoo/addons/dms/static/src/js/components/path/path.esm.js +0 -0
- odoo/addons/dms/static/src/js/dms_portal_tour.js +0 -57
- odoo/addons/dms/static/src/js/fields/path.js +0 -81
- odoo/addons/dms/static/src/js/views/fields/binary/preview_record.esm.js +0 -35
- odoo/addons/dms/static/src/js/views/many_drop_target.js +0 -98
- odoo/addons/dms/static/src/scss/variables.scss +0 -9
- odoo/addons/dms/static/src/xml/views.xml +0 -72
- odoo/addons/dms/template/assets.xml +0 -44
- odoo/addons/dms/template/onboarding.xml +0 -97
- odoo_addon_dms-16.0.1.8.0.5.dist-info/METADATA +0 -203
- odoo_addon_dms-16.0.1.8.0.5.dist-info/top_level.txt +0 -1
@@ -8,10 +8,11 @@
|
|
8
8
|
|
9
9
|
/*
|
10
10
|
:Author: David Goodger (goodger@python.org)
|
11
|
-
:Id: $Id: html4css1.css
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
12
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
13
13
|
|
14
14
|
Default cascading style sheet for the HTML output of Docutils.
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
15
16
|
|
16
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
17
18
|
customize this style sheet.
|
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
274
275
|
margin-left: 2em ;
|
275
276
|
margin-right: 2em }
|
276
277
|
|
277
|
-
pre.code .ln { color:
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
278
279
|
pre.code, code { background-color: #eeeeee }
|
279
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
280
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
@@ -300,7 +301,7 @@ span.option {
|
|
300
301
|
span.pre {
|
301
302
|
white-space: pre }
|
302
303
|
|
303
|
-
span.problematic {
|
304
|
+
span.problematic, pre.problematic {
|
304
305
|
color: red }
|
305
306
|
|
306
307
|
span.section-subtitle {
|
@@ -366,14 +367,17 @@ ul.auto-toc {
|
|
366
367
|
!! This file is generated by oca-gen-addon-readme !!
|
367
368
|
!! changes will be overwritten. !!
|
368
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
369
|
-
!! source digest: sha256:
|
370
|
+
!! source digest: sha256:531f01b97db7166c170f62f0f28861e7635913bc1f5dbdb04e20d7f9d15f855c
|
370
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
371
|
-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/dms/tree/
|
372
|
-
<p>DMS is a module for creating, managing and viewing document files
|
373
|
-
within Odoo.
|
374
|
-
|
375
|
-
|
376
|
-
<p>This module adds portal functionality for directories and files for
|
372
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/dms/tree/17.0/dms"><img alt="OCA/dms" src="https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/dms-17-0/dms-17-0-dms"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/dms&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
|
+
<p>DMS is a module for creating, managing and viewing document files
|
374
|
+
directly within Odoo. This module is only the basis for an entire
|
375
|
+
ecosystem of apps that extend and seamlessly integrate with the document
|
376
|
+
management system.</p>
|
377
|
+
<p>This module adds portal functionality for directories and files for
|
378
|
+
allowed users, both portal or internal users. You can get as well a
|
379
|
+
tokenized link from a directory or a file for sharing it with any
|
380
|
+
anonymous user.</p>
|
377
381
|
<p><strong>Table of contents</strong></p>
|
378
382
|
<div class="contents local topic" id="contents">
|
379
383
|
<ul class="simple">
|
@@ -381,22 +385,26 @@ seamlessly integrate with the document management system.</p>
|
|
381
385
|
<li><a class="reference internal" href="#preview" id="toc-entry-2">Preview</a></li>
|
382
386
|
</ul>
|
383
387
|
</li>
|
384
|
-
<li><a class="reference internal" href="#configuration" id="toc-entry-3">Configuration</a
|
385
|
-
<li><a class="reference internal" href="#
|
386
|
-
<li><a class="reference internal" href="#
|
388
|
+
<li><a class="reference internal" href="#configuration" id="toc-entry-3">Configuration</a></li>
|
389
|
+
<li><a class="reference internal" href="#configuration-1" id="toc-entry-4">Configuration</a><ul>
|
390
|
+
<li><a class="reference internal" href="#create-a-storage" id="toc-entry-5">1. Create a storage</a></li>
|
391
|
+
<li><a class="reference internal" href="#create-an-access-group" id="toc-entry-6">2. Create an access group</a></li>
|
392
|
+
<li><a class="reference internal" href="#create-a-directory" id="toc-entry-7">3. Create a directory</a></li>
|
387
393
|
</ul>
|
388
394
|
</li>
|
389
|
-
<li><a class="reference internal" href="#
|
390
|
-
<li><a class="reference internal" href="#
|
395
|
+
<li><a class="reference internal" href="#migration" id="toc-entry-8">Migration</a></li>
|
396
|
+
<li><a class="reference internal" href="#file-wizard-selection" id="toc-entry-9">File Wizard Selection</a></li>
|
397
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-10">Usage</a><ul>
|
398
|
+
<li><a class="reference internal" href="#portal-functionality" id="toc-entry-11">Portal functionality</a></li>
|
391
399
|
</ul>
|
392
400
|
</li>
|
393
|
-
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-
|
394
|
-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-
|
395
|
-
<li><a class="reference internal" href="#credits" id="toc-entry-
|
396
|
-
<li><a class="reference internal" href="#authors" id="toc-entry-
|
397
|
-
<li><a class="reference internal" href="#contributors" id="toc-entry-
|
398
|
-
<li><a class="reference internal" href="#other-credits" id="toc-entry-
|
399
|
-
<li><a class="reference internal" href="#maintainers" id="toc-entry-
|
401
|
+
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-12">Known issues / Roadmap</a></li>
|
402
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-13">Bug Tracker</a></li>
|
403
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-14">Credits</a><ul>
|
404
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-15">Authors</a></li>
|
405
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-16">Contributors</a></li>
|
406
|
+
<li><a class="reference internal" href="#other-credits" id="toc-entry-17">Other credits</a></li>
|
407
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-18">Maintainers</a></li>
|
400
408
|
</ul>
|
401
409
|
</li>
|
402
410
|
</ul>
|
@@ -405,119 +413,148 @@ seamlessly integrate with the document management system.</p>
|
|
405
413
|
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
406
414
|
<div class="section" id="preview">
|
407
415
|
<h2><a class="toc-backref" href="#toc-entry-2">Preview</a></h2>
|
408
|
-
<p><tt class="docutils literal">
|
409
|
-
|
410
|
-
in order to improve the preview of files.</p>
|
411
|
-
<p><tt class="docutils literal"><span class="pre">python-magic</span></tt> library is recommended to be installed for having whole support
|
412
|
-
to get proper file types and file preview.</p>
|
416
|
+
<p><tt class="docutils literal"><span class="pre">python-magic</span></tt> library is recommended to be installed for having whole
|
417
|
+
support to get proper file types and file preview.</p>
|
413
418
|
</div>
|
414
419
|
</div>
|
415
420
|
<div class="section" id="configuration">
|
416
421
|
<h1><a class="toc-backref" href="#toc-entry-3">Configuration</a></h1>
|
422
|
+
</div>
|
423
|
+
<div class="section" id="configuration-1">
|
424
|
+
<h1><a class="toc-backref" href="#toc-entry-4">Configuration</a></h1>
|
417
425
|
<p>To configure this module, you need to:</p>
|
426
|
+
<div class="section" id="create-a-storage">
|
427
|
+
<h2><a class="toc-backref" href="#toc-entry-5">1. Create a storage</a></h2>
|
418
428
|
<ol class="arabic simple">
|
419
429
|
<li>Go to <em>Documents -> Configuration -> Storages</em>.</li>
|
420
|
-
<li
|
421
|
-
<
|
422
|
-
<
|
423
|
-
<li><
|
424
|
-
<li><
|
430
|
+
<li>Create a new document storage. You can choose between three options
|
431
|
+
on <tt class="docutils literal">Save Type</tt>:<ul>
|
432
|
+
<li><tt class="docutils literal">Database</tt>: Store the files on the database as a field</li>
|
433
|
+
<li><tt class="docutils literal">Attachment</tt>: Store the files as attachments</li>
|
434
|
+
<li><tt class="docutils literal">File</tt>: Store the files on the file system</li>
|
425
435
|
</ul>
|
426
|
-
</dd>
|
427
|
-
</dl>
|
428
436
|
</li>
|
429
|
-
|
430
|
-
|
431
|
-
<
|
432
|
-
<
|
433
|
-
<
|
434
|
-
<li>
|
437
|
+
</ol>
|
438
|
+
</div>
|
439
|
+
<div class="section" id="create-an-access-group">
|
440
|
+
<h2><a class="toc-backref" href="#toc-entry-6">2. Create an access group</a></h2>
|
441
|
+
<ol class="arabic simple">
|
442
|
+
<li>Next, create an administrative access group. Go to <em>Configuration ->
|
443
|
+
Access Groups</em>.<ul>
|
444
|
+
<li>Create a new group, name it appropriately, and turn on all three
|
445
|
+
permissions (Create, Write and Unlink. Read is implied and always
|
446
|
+
enabled).</li>
|
447
|
+
<li>Add any other top-level administrative users to the group if
|
448
|
+
needed (your user should already be there).</li>
|
449
|
+
<li>You can create other groups in here later for fine-grained access
|
450
|
+
control.</li>
|
435
451
|
</ul>
|
436
|
-
</dd>
|
437
|
-
</dl>
|
438
452
|
</li>
|
439
|
-
|
440
|
-
|
441
|
-
<
|
442
|
-
<
|
443
|
-
<
|
453
|
+
</ol>
|
454
|
+
</div>
|
455
|
+
<div class="section" id="create-a-directory">
|
456
|
+
<h2><a class="toc-backref" href="#toc-entry-7">3. Create a directory</a></h2>
|
457
|
+
<ol class="arabic simple">
|
458
|
+
<li>Afterward, go to <em>Documents -> Directories</em>.</li>
|
459
|
+
<li>Create a new directory, mark it as root and select the previously
|
460
|
+
created setting.<ul>
|
461
|
+
<li>Select the <em>Groups</em> tab and add your administrative group created
|
462
|
+
above. If your directory was already created before the group, you
|
463
|
+
can also add it in the access groups (<em>Configuration -> Access
|
464
|
+
Groups</em>).</li>
|
444
465
|
</ul>
|
445
|
-
</dd>
|
446
|
-
</dl>
|
447
466
|
</li>
|
448
|
-
<li
|
449
|
-
|
450
|
-
<dd><ul class="first last">
|
467
|
+
<li>In the directory settings, you can also add other access groups
|
468
|
+
(created above) that will be able to:<ul>
|
451
469
|
<li>read</li>
|
452
470
|
<li>create</li>
|
453
471
|
<li>write</li>
|
454
472
|
<li>delete</li>
|
455
473
|
</ul>
|
456
|
-
</dd>
|
457
|
-
</dl>
|
458
474
|
</li>
|
459
475
|
</ol>
|
476
|
+
</div>
|
477
|
+
</div>
|
460
478
|
<div class="section" id="migration">
|
461
|
-
<
|
462
|
-
<p>If you need to modify the storage Save Type you might want to
|
463
|
-
|
479
|
+
<h1><a class="toc-backref" href="#toc-entry-8">Migration</a></h1>
|
480
|
+
<p>If you need to modify the storage <tt class="docutils literal">Save Type</tt> you might want to
|
481
|
+
migrate the file data. To achieve it, you need to:</p>
|
464
482
|
<ol class="arabic simple">
|
465
|
-
<li>Go to <em>Documents -> Configuration -> Storage</em> and select the storage
|
483
|
+
<li>Go to <em>Documents -> Configuration -> Storage</em> and select the storage
|
484
|
+
you want to modify</li>
|
466
485
|
<li>Modify the save type</li>
|
467
|
-
<li>Press the button
|
468
|
-
|
486
|
+
<li>Press the button Migrate files if you want to migrate all the files
|
487
|
+
at once</li>
|
488
|
+
<li>Press the button Manual File Migration to specify files one by one</li>
|
469
489
|
</ol>
|
470
|
-
<p>You can check all the files that still
|
471
|
-
and migrate them manually on <em>Documents -> Configuration ->
|
490
|
+
<p>You can check all the files that still need to be migrated from all
|
491
|
+
storages and migrate them manually on <em>Documents -> Configuration ->
|
492
|
+
Migration</em></p>
|
472
493
|
</div>
|
473
494
|
<div class="section" id="file-wizard-selection">
|
474
|
-
<
|
475
|
-
<p>There is an action called <
|
476
|
-
|
477
|
-
|
495
|
+
<h1><a class="toc-backref" href="#toc-entry-9">File Wizard Selection</a></h1>
|
496
|
+
<p>There is an action called <tt class="docutils literal">action_dms_file_wizard_selector</tt> to open a
|
497
|
+
wizard to list files in kanban view. This can be used (example
|
498
|
+
dms_attachment_link module) to add a button in kanban view with the
|
499
|
+
action we need.</p>
|
478
500
|
</div>
|
479
501
|
<div class="section" id="usage">
|
480
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
502
|
+
<h1><a class="toc-backref" href="#toc-entry-10">Usage</a></h1>
|
481
503
|
<p>The best way to manage the documents is to switch to the Documents view.
|
482
|
-
Existing documents can be managed there and new documents can be
|
504
|
+
Existing documents can be managed there and new documents can be
|
505
|
+
created.</p>
|
483
506
|
<div class="section" id="portal-functionality">
|
484
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
485
|
-
<p>You can add any portal user to DMS access groups, and then allow that
|
486
|
-
|
507
|
+
<h2><a class="toc-backref" href="#toc-entry-11">Portal functionality</a></h2>
|
508
|
+
<p>You can add any portal user to DMS access groups, and then allow that
|
509
|
+
group in directories, so they will see in the portal such directories
|
510
|
+
and their files. Another possibility is to click on “Share” button
|
511
|
+
inside a directory or a file for obtaining a tokenized link for single
|
512
|
+
access to that resource, no matter if logged or not.</p>
|
487
513
|
</div>
|
488
514
|
</div>
|
489
515
|
<div class="section" id="known-issues-roadmap">
|
490
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
516
|
+
<h1><a class="toc-backref" href="#toc-entry-12">Known issues / Roadmap</a></h1>
|
491
517
|
<ul class="simple">
|
492
518
|
<li>Files preview in portal</li>
|
493
|
-
<li>Allow to download folder in portal and create zip file with all
|
494
|
-
|
495
|
-
<li>
|
519
|
+
<li>Allow to download folder in portal and create zip file with all
|
520
|
+
content</li>
|
521
|
+
<li>Save in cache own_root directories and update in every
|
522
|
+
create/write/unlink function</li>
|
523
|
+
<li>Add a migration procedure for converting an storage to attachment one
|
524
|
+
for populating existing records with attachments as folders</li>
|
496
525
|
<li>Add a link from attachment view in chatter to linked documents</li>
|
497
|
-
<li>If Inherit permissions from related record (the
|
498
|
-
|
499
|
-
|
526
|
+
<li>If Inherit permissions from related record (the
|
527
|
+
inherit_access_from_parent_record field from storage) is changed when
|
528
|
+
directories already exist, inconsistencies may occur because groups
|
529
|
+
defined in the directories and subdirectories will still exist, all
|
530
|
+
groups in these directories should be removed before changing.</li>
|
531
|
+
<li>Since portal users can read <tt class="docutils literal">dms.storage</tt> records, if your module
|
532
|
+
extends this model to another storage backend that needs using
|
533
|
+
secrets, remember to forbid access to the secrets fields by other
|
534
|
+
means. It would be nice to be able to remove that rule at some point.</li>
|
535
|
+
<li>Searchpanel in files: Highlight items (shading) without records when
|
536
|
+
filtering something (by name for example).</li>
|
500
537
|
</ul>
|
501
538
|
</div>
|
502
539
|
<div class="section" id="bug-tracker">
|
503
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
540
|
+
<h1><a class="toc-backref" href="#toc-entry-13">Bug Tracker</a></h1>
|
504
541
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/dms/issues">GitHub Issues</a>.
|
505
542
|
In case of trouble, please check there if your issue has already been reported.
|
506
543
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
507
|
-
<a class="reference external" href="https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%
|
544
|
+
<a class="reference external" href="https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
508
545
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
509
546
|
</div>
|
510
547
|
<div class="section" id="credits">
|
511
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
548
|
+
<h1><a class="toc-backref" href="#toc-entry-14">Credits</a></h1>
|
512
549
|
<div class="section" id="authors">
|
513
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
550
|
+
<h2><a class="toc-backref" href="#toc-entry-15">Authors</a></h2>
|
514
551
|
<ul class="simple">
|
515
552
|
<li>MuK IT</li>
|
516
553
|
<li>Tecnativa</li>
|
517
554
|
</ul>
|
518
555
|
</div>
|
519
556
|
<div class="section" id="contributors">
|
520
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
557
|
+
<h2><a class="toc-backref" href="#toc-entry-16">Contributors</a></h2>
|
521
558
|
<ul class="simple">
|
522
559
|
<li>Mathias Markl <<a class="reference external" href="mailto:mathias.markl@mukit.at">mathias.markl@mukit.at</a>></li>
|
523
560
|
<li>Enric Tobella <<a class="reference external" href="mailto:etobella@creublanca.es">etobella@creublanca.es</a>></li>
|
@@ -535,25 +572,33 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
535
572
|
<li>Khanh Bui <<a class="reference external" href="mailto:khanh.bui@mail.elegosoft.com">khanh.bui@mail.elegosoft.com</a>></li>
|
536
573
|
</ul>
|
537
574
|
</li>
|
575
|
+
<li><a class="reference external" href="https://www.subteno.com">Subteno</a>:<ul>
|
576
|
+
<li>Timothée Vannier <<a class="reference external" href="mailto:tva@subteno.com">tva@subteno.com</a>></li>
|
577
|
+
</ul>
|
578
|
+
</li>
|
538
579
|
</ul>
|
539
580
|
</div>
|
540
581
|
<div class="section" id="other-credits">
|
541
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
542
|
-
<p>The migration of this module from 15.0 to 16.0 was financially supported by <a class="reference external" href="https://www.agenterp.com">AgentERP</a></p>
|
582
|
+
<h2><a class="toc-backref" href="#toc-entry-17">Other credits</a></h2>
|
543
583
|
<p>Some pictures are based on or inspired by:</p>
|
544
584
|
<ul class="simple">
|
545
585
|
<li><a class="reference external" href="https://www.flaticon.com/authors/roundicons">Roundicons</a></li>
|
546
586
|
<li><a class="reference external" href="https://www.flaticon.com/authors/smashicons">Smashicons</a></li>
|
587
|
+
<li><a class="reference external" href="https://github.com/EmojiTwo/emojitwo">EmojiOne</a> : Portal DMS icon</li>
|
588
|
+
<li><a class="reference external" href="https://github.com/primer/octicons/">GitHub Octicons</a> : The main
|
589
|
+
DMS icon</li>
|
547
590
|
</ul>
|
548
591
|
</div>
|
549
592
|
<div class="section" id="maintainers">
|
550
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
593
|
+
<h2><a class="toc-backref" href="#toc-entry-18">Maintainers</a></h2>
|
551
594
|
<p>This module is maintained by the OCA.</p>
|
552
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
595
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
596
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
597
|
+
</a>
|
553
598
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
554
599
|
mission is to support the collaborative development of Odoo features and
|
555
600
|
promote its widespread use.</p>
|
556
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/dms/tree/
|
601
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/dms/tree/17.0/dms">OCA/dms</a> project on GitHub.</p>
|
557
602
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
558
603
|
</div>
|
559
604
|
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<g clip-path="url(#clip0_1008_2)">
|
3
|
+
<path d="M54 3L5 22L6.5 32.5L9.5 40L10.5 39.5L12 35L15 32.5L32.5 23.5L38 16L59.5 6.5V4.5L58 5H57V3L54.5 3.5L54 3Z" fill="#FBDBD0"/>
|
4
|
+
<path d="M13 59L11 37L11.5 36L14 32.5L23 28.5L32.5 23L36 18.5L38 16L61 6.5L59.5 16L55.5 30.5L14 59H13Z" fill="#C1DBF6"/>
|
5
|
+
<path d="M61.3151 5.90296L61.3155 5.90333C61.6617 6.31166 61.7685 6.68018 61.7936 6.93821C61.8062 7.06846 61.7983 7.17296 61.7878 7.24284C61.7826 7.27776 61.7768 7.30393 61.7727 7.32019C61.7707 7.32832 61.769 7.33394 61.7681 7.33693L61.7679 7.33778L61.7679 7.338L61.7678 7.33821L61.7677 7.33857L61.7675 7.33911L61.7674 7.3394L61.7643 7.34837L61.7618 7.3593L56.5987 30.4221L12.3444 61.661L12.3341 61.6121L12.2974 61.639L2.62867 20.6111L2.62906 20.611L2.6254 20.599L2.62539 20.5989L2.62538 20.5989L2.62532 20.5987L2.62491 20.5973L2.62307 20.5911L2.61557 20.5652C2.60896 20.5421 2.59925 20.5073 2.58716 20.4619C2.56297 20.3711 2.52925 20.2375 2.4917 20.0688C2.41656 19.731 2.32628 19.2531 2.26611 18.6938C2.14534 17.5714 2.14795 16.1398 2.6216 14.8583L2.62161 14.8583C3.10122 13.5603 3.92967 12.6648 4.64144 12.0926C4.99711 11.8067 5.32236 11.6025 5.55779 11.4702C5.67544 11.4041 5.77044 11.3561 5.83533 11.3249C5.86776 11.3093 5.89265 11.2979 5.90905 11.2906L5.92532 11.2834L23.5018 5.60147L23.5027 5.60126L23.5256 5.59594C23.5464 5.59128 23.578 5.58455 23.6193 5.57674C23.7019 5.56113 23.8233 5.54128 23.975 5.52508C24.2788 5.49264 24.7018 5.47516 25.1779 5.5347C26.1281 5.65349 27.2829 6.07705 28.1371 7.29954L28.1373 7.29989C28.5139 7.83635 28.9079 8.55923 29.21 9.15349C29.3604 9.44951 29.487 9.71156 29.576 9.89952C29.6204 9.99348 29.6555 10.0689 29.6793 10.1206L29.7065 10.18L29.7134 10.1952L29.7151 10.199L29.7155 10.1999L29.7156 10.2001L29.7157 10.2001L29.7907 10.3666L29.9633 10.307L53.0293 2.34204L53.0293 2.34208L53.0331 2.34068L53.0331 2.34067L53.0332 2.34064L53.0333 2.3406L53.0336 2.34051L53.0365 2.33944L53.0504 2.33463C53.0631 2.33034 53.0824 2.324 53.1073 2.31637C53.1574 2.30109 53.2299 2.28078 53.3176 2.26136C53.4948 2.22217 53.7267 2.18829 53.9592 2.20261C54.1922 2.21697 54.41 2.27862 54.5774 2.41514C54.7403 2.54801 54.8788 2.77075 54.9212 3.15587L54.9497 3.41461L55.1924 3.32044L57.4985 2.42557L57.1831 4.58306L57.1319 4.93309L57.4582 4.79647L59.7852 3.82223L59.5263 5.50966L59.4722 5.86247L59.8013 5.72443L60.0975 5.60023C60.1011 5.59938 60.1055 5.59835 60.1107 5.59718C60.1287 5.59316 60.1559 5.58754 60.1906 5.58185C60.2603 5.57043 60.3582 5.55899 60.47 5.55899C60.7509 5.55899 61.0838 5.62869 61.3151 5.90296ZM6.59316 22.903L6.43985 22.9625L6.46857 23.1244L9.35108 39.3709L9.74667 39.313L8.139 25.4484L56.4503 5.21947L56.5773 5.16629L56.5729 5.02866L56.5344 3.81316L56.5255 3.53088L56.2622 3.63304L56.3345 3.8195C56.2622 3.63304 56.2621 3.63306 56.262 3.6331L56.2615 3.6333L56.2594 3.63411L56.2512 3.63731L56.2184 3.65L56.0898 3.6999L55.5928 3.89271L53.7456 4.60938L47.4818 7.03952L31.4277 13.268L15.3735 19.4965L9.1097 21.9267L7.26248 22.6434L6.76551 22.8362L6.63688 22.8861L6.60417 22.8988L6.59592 22.902L6.59385 22.9028L6.59333 22.903C6.59322 22.903 6.59316 22.903 6.6655 23.0895L6.59316 22.903ZM10.0533 37.282L10.4476 37.3005C10.6223 36.4776 10.9443 35.3837 11.5322 34.4093C12.1129 33.4531 12.9088 32.6731 13.5645 32.1301C13.8915 31.8593 14.1818 31.6489 14.3898 31.5065C14.4938 31.4354 14.5771 31.3813 14.634 31.3452C14.6625 31.3272 14.6843 31.3137 14.6989 31.3048L14.7136 31.2959L14.7164 31.2945L14.7476 31.2792L14.8695 31.2195L15.3351 30.9916C15.7377 30.7944 16.3162 30.5109 17.0202 30.1657C18.428 29.4753 20.3374 28.5381 22.3435 27.5507C26.3543 25.5764 30.7553 23.3997 32.3042 22.5955L32.3042 22.5954C33.0514 22.2071 33.6925 21.553 34.2321 20.8061C34.7728 20.0577 35.2199 19.2046 35.5753 18.4033C35.931 17.6014 36.1969 16.8467 36.3738 16.2927C36.4623 16.0156 36.5287 15.7883 36.573 15.6299C36.5902 15.5686 36.604 15.5176 36.6146 15.478L58.7886 6.15034L58.8918 6.10692L58.9087 5.99623L59.0557 5.03523L59.1096 4.68281L58.7808 4.82051L8.85876 25.7245L8.72001 25.7826L8.73733 25.932L10.0533 37.282ZM55.2191 29.5986L55.2823 29.5541L55.2992 29.4787L60.2242 7.47768L60.3089 7.09927L59.9514 7.24964L37.9284 16.5146L37.8428 16.5507L37.8151 16.6395C37.5248 17.5703 36.9978 19.0345 36.1989 20.4436C35.3979 21.8565 34.3365 23.1907 32.9878 23.8915C30.0006 25.4431 16.7408 31.9355 15.4411 32.5713L15.4313 32.5762L15.422 32.582C15.1367 32.7628 13.6545 33.7473 12.795 35.1643L12.7948 35.1645C12.0305 36.4292 11.799 38.0005 11.7434 38.4736L11.7407 38.4963L11.7432 38.5189L13.9182 58.2819L13.9552 58.6183L14.2321 58.4236L55.2191 29.5986Z" fill="white" stroke="#374874" stroke-width="0.4"/>
|
6
|
+
</g>
|
7
|
+
<defs>
|
8
|
+
<clipPath id="clip0_1008_2">
|
9
|
+
<rect width="64" height="64" fill="white"/>
|
10
|
+
</clipPath>
|
11
|
+
</defs>
|
12
|
+
</svg>
|
@@ -1,7 +1,12 @@
|
|
1
1
|
/** @odoo-module **/
|
2
2
|
|
3
|
-
|
3
|
+
// /** ********************************************************************************
|
4
|
+
// Copyright 2024 Subteno - Timothée Vannier (https://www.subteno.com).
|
5
|
+
// License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
6
|
+
// **********************************************************************************/
|
4
7
|
import {Component, onWillUpdateProps} from "@odoo/owl";
|
8
|
+
import {registry} from "@web/core/registry";
|
9
|
+
import {standardFieldProps} from "@web/views/fields/standard_field_props";
|
5
10
|
import {useService} from "@web/core/utils/hooks";
|
6
11
|
|
7
12
|
class DmsPathField extends Component {
|
@@ -13,7 +18,8 @@ class DmsPathField extends Component {
|
|
13
18
|
}
|
14
19
|
|
15
20
|
formatData(props) {
|
16
|
-
|
21
|
+
const path_json = props.record.data && props.record.data.path_json;
|
22
|
+
this.data = JSON.parse(path_json || "[]");
|
17
23
|
}
|
18
24
|
|
19
25
|
_onNodeClicked(event) {
|
@@ -29,6 +35,18 @@ class DmsPathField extends Component {
|
|
29
35
|
}
|
30
36
|
}
|
31
37
|
|
32
|
-
DmsPathField.supportedTypes = ["text"];
|
33
38
|
DmsPathField.template = "dms.DmsPathField";
|
34
|
-
|
39
|
+
DmsPathField.props = {
|
40
|
+
...standardFieldProps,
|
41
|
+
};
|
42
|
+
|
43
|
+
const dmsPathField = {
|
44
|
+
component: DmsPathField,
|
45
|
+
display_name: "Dms Path Field",
|
46
|
+
supportedTypes: ["text"],
|
47
|
+
extractProps: () => {
|
48
|
+
return {};
|
49
|
+
},
|
50
|
+
};
|
51
|
+
|
52
|
+
registry.category("fields").add("path_json", dmsPathField);
|
@@ -1,11 +1,14 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<!--
|
3
|
+
Copyright 2024 Subteno - Timothée Vannier (https://www.subteno.com).
|
4
|
+
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
5
|
+
-->
|
6
|
+
<templates xml:space="preserve" id="template">
|
7
|
+
<t t-name="dms.DmsPathField">
|
5
8
|
<t t-set="path_length" t-value="data.length - 1" />
|
6
9
|
<t t-foreach="data" t-as="elem" t-key="elem_index" style="display: inline">
|
7
10
|
<t t-if="elem_index !== path_length">
|
8
|
-
<span style="display: inline">/</span>
|
11
|
+
<span style="display: inline" t-if="elem_index !== 0">/</span>
|
9
12
|
<a
|
10
13
|
class="oe_form_uri"
|
11
14
|
data-model="dms.directory"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/** @odoo-module **/
|
2
|
+
|
3
|
+
// /** ********************************************************************************
|
4
|
+
// Copyright 2024 Subteno - Timothée Vannier (https://www.subteno.com).
|
5
|
+
// License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
6
|
+
// **********************************************************************************/
|
7
|
+
import {BinaryField} from "@web/views/fields/binary/binary_field";
|
8
|
+
import {registry} from "@web/core/registry";
|
9
|
+
import {standardFieldProps} from "@web/views/fields/standard_field_props";
|
10
|
+
import {useFileViewer} from "@web/core/file_viewer/file_viewer_hook";
|
11
|
+
import {useService} from "@web/core/utils/hooks";
|
12
|
+
|
13
|
+
export class PreviewRecordField extends BinaryField {
|
14
|
+
setup() {
|
15
|
+
super.setup();
|
16
|
+
this.store = useService("mail.store");
|
17
|
+
this.fileViewer = useFileViewer();
|
18
|
+
}
|
19
|
+
|
20
|
+
onFilePreview() {
|
21
|
+
const self = this;
|
22
|
+
const attachment = this.store.Attachment.insert({
|
23
|
+
id: self.props.record.resId,
|
24
|
+
filename: self.props.record.data.display_name || "",
|
25
|
+
name: self.props.record.data.display_name || "",
|
26
|
+
mimetype: self.props.record.data.mimetype,
|
27
|
+
model_name: self.props.record.resModel,
|
28
|
+
});
|
29
|
+
this.fileViewer.open(attachment);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
PreviewRecordField.template = "dms.FilePreviewField";
|
34
|
+
PreviewRecordField.props = {
|
35
|
+
...standardFieldProps,
|
36
|
+
};
|
37
|
+
|
38
|
+
const previewRecordField = {
|
39
|
+
component: PreviewRecordField,
|
40
|
+
dependencies: [BinaryField],
|
41
|
+
display_name: "Preview Record",
|
42
|
+
supportedTypes: ["binary"],
|
43
|
+
extractProps: () => {
|
44
|
+
return {};
|
45
|
+
},
|
46
|
+
};
|
47
|
+
registry.category("fields").add("preview_binary", previewRecordField);
|
odoo/addons/dms/static/src/js/{views/fields/binary → fields/preview_binary}/preview_record.xml
RENAMED
@@ -1,11 +1,13 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<!--
|
3
|
+
Copyright 2024 Subteno - Timothée Vannier (https://www.subteno.com).
|
4
|
+
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
5
|
+
-->
|
2
6
|
<templates id="template" xml:space="preserve">
|
3
|
-
|
4
7
|
<t
|
5
8
|
t-name="dms.FilePreviewField"
|
6
9
|
t-inherit="web.BinaryField"
|
7
10
|
t-inherit-mode="primary"
|
8
|
-
owl="1"
|
9
11
|
>
|
10
12
|
<xpath expr="//div[hasclass('d-inline-flex')]" position="inside">
|
11
13
|
<t
|
@@ -22,7 +24,7 @@
|
|
22
24
|
'audio/mpeg',
|
23
25
|
'video/x-matroska',
|
24
26
|
'video/mp4',
|
25
|
-
'video/webm'
|
27
|
+
'video/webm'
|
26
28
|
]"
|
27
29
|
/>
|
28
30
|
<t t-if="readable_types.includes(props.record.data.mimetype)">
|
@@ -35,5 +37,4 @@
|
|
35
37
|
</t>
|
36
38
|
</xpath>
|
37
39
|
</t>
|
38
|
-
|
39
40
|
</templates>
|