Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] dms #262

Merged
merged 133 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
6e1c3a7
Version 1.0.0
May 4, 2017
71032f2
9.0 > 10.0
May 13, 2017
a5808d1
added markdown preview using showdown js library
sherpya Jul 24, 2017
bac8561
update
Oct 4, 2017
845762d
Add Ukrainian translation to mik_dms and muk_dms_access
Jun 25, 2018
a23ca31
Documents 2.0
keshrath Jul 10, 2018
71f151b
publish muk_dms - 11.0
keshrath Jul 30, 2018
1c4272c
v12
keshrath Sep 12, 2018
de817c0
[IMP] : black, isort, prettier
etobella May 18, 2020
1450027
[MIG] dms: from muk_dms to dms
etobella May 18, 2020
2f33a8b
[MIG] Dms tag
May 18, 2020
0c0641f
[MIG] dms: File
May 18, 2020
b479c2f
[MIG][13.0] dms: Finish migration
etobella May 18, 2020
d6ac81d
[IMP] Minor mig fixes
May 19, 2020
1e832e2
[MIG] dms: fix tests
etobella May 19, 2020
b3991dd
[IMP] Add security groups
May 19, 2020
02bba1e
[ADD] dms: add funcionality of muk_dms_file
May 19, 2020
bb07837
[MIG] dms: File functionality
etobella May 19, 2020
9d7fddd
[IMP] dms: Allow to drag and drop
etobella May 19, 2020
7c10184
[FIX] Various fixes
May 19, 2020
c23657c
[IMP] dms: Add mail
etobella May 19, 2020
0b4088c
[FIX] dms: remove unused code and fixing: webpanel, migration, thumbn…
etobella May 19, 2020
4176f1e
[IMP] dms: add migration script for muk_dms
etobella Jul 6, 2020
add1d27
[13.0][MIG] dms: make migrations scripts compatible with older
LoisRForgeFlow Jul 9, 2020
b16c71e
[FIX] dms: Download file with its proper name
etobella Aug 12, 2020
1f01719
[FIX] dms: missing banner images & Load fields on the usual way
etobella Aug 14, 2020
30b9df6
[FIX] dms: Fix preview widget
etobella Aug 27, 2020
f7c64f5
[FIX] dms: fix wrong test
Sep 28, 2020
95e8d96
[IMP] dms: Portal
victoralmau Oct 5, 2020
1d6ed9c
[FIX] dms: /my/dms change to user and separate some urls in some func…
victoralmau Oct 19, 2020
5f6cfc7
[FIX] : Fix mimetype error in some files (.xlsx for example)
victoralmau Nov 3, 2020
9bae750
[ADD] DMS integration with attachment
luismalta Aug 14, 2020
88ac0b4
[IMP] dms: Attachment integration
victoralmau Nov 6, 2020
b51dc78
Added translation using Weblate (Hebrew)
ygol Nov 10, 2020
fb98992
Translated using Weblate (Hebrew)
ygol Nov 10, 2020
99a2d0b
Added translation using Weblate (Dutch)
bosd Dec 13, 2020
4dde867
[FIX] dms: Remove request website user try
victoralmau Jan 18, 2021
e2cfe68
[FIX] dms: Fix error when web_drop_target addon used to create new fi…
victoralmau Feb 1, 2021
8ff0748
[FIX] dms: Adapt to 13.0
victoralmau Feb 2, 2021
d8697d1
Added translation using Weblate (Italian)
jackjack82 Feb 5, 2021
1c5a4dc
[IMP] dms: Integrate with mail_preview_base
etobella Sep 28, 2020
d6785a0
[FIX] dms: Kanban view
victoralmau Feb 8, 2021
9148608
[FIX] dms: Remove category creation in kanban tag view to prevent error
victoralmau Feb 11, 2021
ef99706
[FIX] dms: Use sudo() in attachment operacion (search dms directories…
victoralmau Feb 17, 2021
9ccc9a3
[REF+FIX] dms: Refactor code to create abstract.dms.mixin to contain …
victoralmau Feb 17, 2021
624310f
[FIX] dms: Prevent error when archive records and later process try t…
victoralmau Feb 18, 2021
aadb96a
[FIX] dms: Add domain operator
Shide Apr 22, 2021
ebb9cc2
[12.0] [FIX] dms: Check `default_directory_id` context key
Shide Apr 26, 2021
c980a6b
[FIX] dms: Prevent parent_id error in directories in some UI cases [F…
victoralmau Mar 30, 2021
52376a5
[IMP] dms: Inherit permissions from related records
victoralmau Apr 5, 2021
39de18e
[IMP] dms: black, isort, prettier
victoralmau Apr 8, 2021
f5fa5c9
[MIG] dms: Migration to 14.0
victoralmau Apr 27, 2021
ee2b37e
[FIX] dms: Remove action column in portal (only used in files) and co…
victoralmau May 25, 2021
2e76ba0
[FIX] dms: Fix error in portal with access_token
victoralmau May 26, 2021
a1b6ce8
[FIX] dms: Improve tests to prevent error if installed other addons a…
victoralmau May 31, 2021
5255e04
[FIX] dms: Apply _apply_access_groups correctly (specially according …
victoralmau May 27, 2021
9bf824c
[FIX] improve some queries
Jun 10, 2021
60f1a7b
[FIX] dms: cascade removal of related files/directories
Jun 8, 2021
c76a73b
[FIX] dms: do not fail for missing models on upgrade
Jun 1, 2021
bb2ef6f
[FIX] dms: image thumbnails performance
May 28, 2021
2ceb4ac
[FIX] dms: Fix multi-company rules + migration scripts
victoralmau Jul 8, 2021
5032d12
[REF] dms: modify permissions computation
Jul 8, 2021
08b2774
[FIX] dms: respect computed security rules in all contexts
Jul 8, 2021
d9a9e80
[FIX] dms: Prevent error (apply sudo()) when recursive directories re…
victoralmau Jul 8, 2021
b35bc6d
[FIX] dms: Fix tests for environments that add other groups to base u…
joao-p-marques Jul 9, 2021
7652d20
[REF] dms: Adapt to 14.0
victoralmau Jul 9, 2021
55455f4
[IMP] dms: automatic image thumbnails
Jul 28, 2021
5f22dfd
Explicit Access Group instructions
majenkotech Sep 13, 2021
64895c8
[FIX] dms: Add python-magic library to readme
victoralmau Sep 3, 2021
ca66eea
[FIX] dms: Drag & Drop
Tardo Oct 20, 2021
2914173
[IMP] dms: Set the drop target to the kanban view, excluding the sear…
etobella Oct 29, 2021
ca5d546
[FIX] dms: Pending attribute mimetype
etobella Oct 29, 2021
0bfaeb0
[FIX] dms: Show the total of files (of all subdirectories) in the for…
victoralmau Nov 5, 2021
1531dc6
[FIX] dms: Define the file extension correctly (even if there is no e…
victoralmau Nov 5, 2021
fbb645c
[FIX] dms: Prevent CacheMis error from count_total_files in some NewI…
victoralmau Jan 24, 2022
d6747c7
[FIX] dms: Change size field type from integer to float to prevent 21…
victoralmau Jan 24, 2022
5e0e327
[FIX] dms: Replace the content field with size in the form view of th…
victoralmau Feb 7, 2022
5648be3
[FIX] dms: The internal user group is added as an inheritance to the …
victoralmau Mar 1, 2022
ba882fb
[MIG] dms: Migration to 15.0
JasminSForgeFlow Feb 11, 2022
95ea808
[MIG] dms: Finish migration
etobella May 17, 2022
f368228
[UPD] Update dms.pot
May 19, 2022
4f7f3fa
[UPD] README.rst
OCA-git-bot May 19, 2022
675883c
[FIX] dms: Add Archived ribbon in form views and remove active field …
victoralmau May 17, 2022
285d4a7
[UPD] Update dms.pot
May 23, 2022
d8b66ed
dms 15.0.1.1.0
OCA-git-bot May 23, 2022
36fe3a6
Update translation files
oca-transbot May 23, 2022
96df043
[FIX] dms: do_warn method no longer available in v15
gdrius Jul 15, 2022
e05712b
Translated using Weblate (German)
marylla Jul 18, 2022
8575c04
dms 15.0.1.1.1
OCA-git-bot Jul 19, 2022
4b156cb
[IMP+FIX] dms: Searchpanel changes:
victoralmau Sep 1, 2022
ff01c8f
dms 15.0.1.2.0
OCA-git-bot Sep 2, 2022
882718f
[IMP] dms: Use _prepare_home_portal_values() function.
victoralmau Sep 6, 2022
df2602d
[IMP] dms: Refactor tests.
victoralmau Sep 5, 2022
09340ac
dms 15.0.1.2.1
OCA-git-bot Sep 6, 2022
5657ba0
dms 15.0.1.3.0
OCA-git-bot Sep 8, 2022
73a4ec7
[IMP] dms: Changes in file tree view: - Set multi_edit - Add tag_ids …
victoralmau Jul 13, 2021
3ce8044
[FIX] dms: Compute mimetype in dms_file correctly to allow preview
victoralmau Jul 13, 2021
2f532e0
[IMP] dms: automatic image thumbnails
victoralmau Nov 8, 2021
7718df3
[IMP] dms: Show in directory kaban view only root directories (Change…
victoralmau Jul 14, 2021
07043f0
[FIX] dms: Show directory short name in searchpanel.
victoralmau Sep 7, 2022
56bd017
[UPD] Update dms.pot
Sep 8, 2022
ae33077
dms 15.0.1.4.0
OCA-git-bot Sep 8, 2022
89920a5
Update translation files
oca-transbot Sep 8, 2022
6690f64
[FIX] dms: Searchpanel from directories
victoralmau Sep 8, 2022
c840756
[FIX] dms: Add operator parameter required (forgotten at https://gith…
victoralmau Sep 12, 2022
bc0ebbe
dms 15.0.1.5.0
OCA-git-bot Sep 12, 2022
126c06b
[FIX] dms: skip attachment creation when storage type is different fr…
marcelsavegnago Sep 16, 2022
d75e24e
dms 15.0.1.5.1
OCA-git-bot Sep 19, 2022
2836d3a
[FIX] dms: Remove migrations folder from 14.0
victoralmau Nov 22, 2022
dd73703
[FIX] dms: Remove parent_id defined if you do not have access to it (…
victoralmau Feb 10, 2023
9909389
[FIX] dms: Limit breadcrumb from portal to directories you have acces…
victoralmau Feb 9, 2023
3d284cf
[FIX] dms: Get the "parent" directories (those of the top level to wh…
victoralmau Feb 7, 2023
e579a88
dms 15.0.1.5.2
OCA-git-bot Feb 10, 2023
99825c1
[FIX] dms: Use the correct domain with inherit_access_from_parent_rec…
victoralmau Jan 25, 2023
90481af
dms 15.0.1.6.0
OCA-git-bot Feb 23, 2023
0b7a584
[IMP] dms: Add action_dms_file_wizard_selector action.
victoralmau Feb 10, 2023
dd20284
[UPD] Update dms.pot
Feb 28, 2023
65e7824
[UPD] README.rst
OCA-git-bot Feb 28, 2023
6f55f0a
dms 15.0.1.7.0
OCA-git-bot Feb 28, 2023
253a354
Update translation files
weblate Feb 28, 2023
f4ff79b
[FIX] dms: dms.file thumbnail generation checks for supported mimetypes
aleuffre Apr 3, 2023
3d02043
dms 15.0.1.7.1
OCA-git-bot Apr 20, 2023
172ffb1
[IMP] dms: more restrictive access rights for access groups
aleuffre Aug 31, 2022
21f0518
dms 15.0.1.8.0
OCA-git-bot Jun 7, 2023
c7f22af
[IMP] dms: Increase the speed of tests
victoralmau Jul 18, 2023
7110a22
dms 15.0.1.8.1
OCA-git-bot Jul 18, 2023
198758f
[FIX] dms: Explicitly exclude the pdf type in the image_1920 field of…
victoralmau Jun 15, 2023
a561d5a
dms 15.0.1.8.2
OCA-git-bot Jul 18, 2023
a9df14d
Translated using Weblate (Spanish)
Ivorra78 Jul 20, 2023
74c10c7
Translated using Weblate (Spanish)
Ivorra78 Jul 28, 2023
dc11e34
[UPD] README.rst
OCA-git-bot Sep 3, 2023
87340fd
[IMP] dms: pre-commit stuff
Sep 18, 2023
05f7c67
[MIG] dms: Migration from 15.0 to 16.0
Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions dms/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
==========================
Document Management System
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b1e60e0ea0e646cb5b470ed09f40c4175157a6b0e310b6e9ea7352fb5014f9bd
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github
:target: https://github.com/OCA/dms/tree/15.0/dms
:alt: OCA/dms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/dms-15-0/dms-15-0-dms
: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/dms&target_branch=15.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

DMS is a module for creating, managing and viewing document files directly
within Odoo.
This module is only the basis for an entire ecosystem of apps that extend and
seamlessly integrate with the document management system.

This module adds portal functionality for directories and files for allowed users, both portal or internal users. You can get as well a tokenized link from a directory or a file for sharing it with any anonymous user.

**Table of contents**

.. contents::
:local:

Installation
============

Preview
~~~~~~~

``mail_preview_base`` is required for DMS but it is recommended to install all
the other `mail_preview` modules from `social` OCA repository
in order to improve the preview of files.

``python-magic`` library is recommended to be installed for having whole support
to get proper file types and file preview.

Configuration
=============

To configure this module, you need to:

#. Go to *Documents -> Configuration -> Storages*.
#. Create a new document storage. You can choose between two options on `Save Type`:
* `Database`: Store the files on the database as a field
* `Attachment`: Store the files as attachments
#. Next create an administrative access group. Go to *Configuration -> Access Groups*.
* Create a new group, name it appropriately, and turn on all three permissions (Create, Write and Unlink - Read is implied and always enabled).
* Add any other top-level administrative users to the group if needed (your user should already be there).
* You can create other groups in here later for fine grained access control.
#. Afterwards go to *Documents -> Directories*.
#. Create a new directory, mark it as root and select the previously created setting.
* Select the *Groups* tab and add your administrative group created above.
#. On the Directory you can also add other access groups (created above) that will be able to:
* read
* create
* write
* delete


Migration
~~~~~~~~~

If you need to modify the storage Save Type you might want to migrate the file data.
In order to achieve it you need to:

#. Go to *Documents -> Configuration -> Storage* and select the storage you want to modify
#. Modify the save type
#. Press the button `Migrate files` if you want to migrate all the files at once
#. Press the button `Manual File Migration` in order to specify files one by one

You can check all the files that still needs to be migrated from all storages
and migrate them manually on *Documents -> Configuration -> Migration*


File Wizard Selection
~~~~~~~~~~~~~~~~~~~~~

There is an action called `action_dms_file_wizard_selector` to open a wizard to list files in kanban view.
This can be used (example `dms_attachment_link` module) to add a button in kanban view with the action we need.

Usage
=====

The best way to manage the documents is to switch to the Documents view.
Existing documents can be managed there and new documents can be created.

Portal functionality
~~~~~~~~~~~~~~~~~~~~

You can add any portal user to DMS access groups, and then allow that group in directories, so they will see in the portal such directories and their files.
Another possibility is to click on "Share" button inside a directory or a file for obtaining a tokenized link for single access to that resource, no matter if logged or not.

Known issues / Roadmap
======================

- Files preview in portal
- Allow to download folder in portal and create zip file with all content
- Save in cache own_root directories and update in every create/write/unlink function
- Add a migration procedure for converting an storage to attachment one for populating existing records with attachments as folders
- Add a link from attachment view in chatter to linked documents
- If Inherit permissions from related record (the inherit_access_from_parent_record field from storage) is changed when directories already exist, inconsistencies may occur because groups defined in the directories and subdirectories will still exist, all groups in these directories should be removed before changing.
- Since portal users can read ``dms.storage`` records, if your module extends this model to another storage backend that needs using secrets, remember to forbid access to the secrets fields by other means. It would be nice to be able to remove that rule at some point.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/dms/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 <https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* MuK IT
* Tecnativa

Contributors
~~~~~~~~~~~~

* Mathias Markl <[email protected]>
* Enric Tobella <[email protected]>
* Antoni Romera
* Gelu Boros <[email protected]>

* `Tecnativa <https://www.tecnativa.com>`_:

* Víctor Martínez
* Pedro M. Baeza
* Jairo Llopis

* `Elego <https://www.elegosoft.com>`_:

* Yu Weng <[email protected]>
* Philip Witte <[email protected]>
* Khanh Bui <[email protected]>

Other credits
~~~~~~~~~~~~~

Some pictures are based on or inspired by:

* `Roundicons <https://www.flaticon.com/authors/roundicons>`_
* `Smashicons <https://www.flaticon.com/authors/smashicons>`_

The migration of this module from 15.0 to 16.0 was finanically supported by `AgentERP <https://www.agenterp.com>`_

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/dms <https://github.com/OCA/dms/tree/15.0/dms>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions dms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import controllers
from . import models
58 changes: 58 additions & 0 deletions dms/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright 2017-2019 MuK IT GmbH
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "Document Management System",
"summary": """Document Management System for Odoo""",
"version": "16.0.1.0.0",
"category": "Document Management",
"license": "LGPL-3",
"website": "https://github.com/OCA/dms",
"author": "MuK IT, Tecnativa, Odoo Community Association (OCA)",
"depends": [
"mail",
"http_routing",
"portal",
"base",
],
"data": [
"security/security.xml",
"security/ir.model.access.csv",
"actions/file.xml",
"template/onboarding.xml",
"views/menu.xml",
"views/tag.xml",
"views/category.xml",
"views/dms_file.xml",
"views/directory.xml",
"views/storage.xml",
"views/dms_access_groups_views.xml",
"views/res_config_settings.xml",
"views/dms_portal_templates.xml",
],
"assets": {
"mail.assets_messaging": [
("include", "mail.assets_core_messaging"),
"dms/static/src/models/*.js",
],
"web.assets_backend": [
"dms/static/src/scss/*",
"dms/static/src/js/fields/*",
"dms/static/src/js/views/*.esm.js",
"dms/static/src/js/views/*.xml",
pedrobaeza marked this conversation as resolved.
Show resolved Hide resolved
"dms/static/src/js/views/fields/binary/*",
],
"web.assets_frontend": ["dms/static/src/js/dms_portal_tour.js"],
},
"demo": [
"demo/res_users.xml",
"demo/access_group.xml",
"demo/category.xml",
"demo/tag.xml",
"demo/storage.xml",
"demo/directory.xml",
"demo/file.xml",
],
"images": ["static/description/banner.png"],
"application": True,
}
16 changes: 16 additions & 0 deletions dms/actions/file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--

Copyright 2017-2019 MuK IT GmbH
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

-->
<odoo>
<record id="action_dms_attachment_migrate" model="ir.actions.server">
<field name="name">Migrate</field>
<field name="model_id" ref="model_dms_file" />
<field name="binding_model_id" ref="dms.model_dms_file" />
<field name="state">code</field>
<field name="code">records.action_migrate()</field>
</record>
</odoo>
2 changes: 2 additions & 0 deletions dms/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import main
from . import portal
49 changes: 49 additions & 0 deletions dms/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2017-2019 MuK IT GmbH
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import http
from odoo.http import request


class OnboardingController(http.Controller):
@http.route("/dms/document_onboarding/directory", auth="user", type="json")
def document_onboarding_directory(self):
company = request.env.user.company_id
closed = company.documents_onboarding_state == "closed"
check = request.env.user.has_group("dms.group_dms_manager")
if check and not closed:
return {
"html": request.env["ir.qweb"]._render(
request.env.ref("dms.document_onboarding_directory_panel").id,
{
"state": company.get_and_update_documents_onboarding_state(),
"company": company,
},
)
}
return {}

@http.route("/dms/document_onboarding/file", auth="user", type="json")
def document_onboarding_file(self):
company = request.env.user.company_id
closed = company.documents_onboarding_state == "closed"
check = request.env.user.has_group("dms.group_dms_manager")
if check and not closed:
return {
"html": request.env["ir.qweb"]._render(
request.env.ref("dms.document_onboarding_file_panel").id,
{
"state": company.get_and_update_documents_onboarding_state(),
"company": company,
},
)
}
return {}

@http.route("/config/dms.forbidden_extensions", type="json", auth="user")
def forbidden_extensions(self, **_kwargs):
params = request.env["ir.config_parameter"].sudo()
return {
"forbidden_extensions": params.get_param(
"dms.forbidden_extensions", default=""
)
}
Loading
Loading