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

[13.0][MIG] dms #1

Merged
merged 22 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
125 changes: 125 additions & 0 deletions dms/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
==========================
Document Management System
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/13.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-13-0/dms-13-0-dms
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/292/13.0
:alt: Try me on Runbot

|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.

**Table of contents**

.. contents::
:local:

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
#. Afterwards go to *Documents -> Directories*.
#. Create a new directory, mark it as root and select the previously created setting.
etobella marked this conversation as resolved.
Show resolved Hide resolved
#. On the Directory you can also define the access groups 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*

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.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%2013.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

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

* Mathias Markl <mathias.markl@mukit.at>
* Enric Tobella <etobella@creublanca.es>
* Antoni Romera
* Gelu Boros <gelu.boros@rgbconsulting.com>

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

Some pictures are based on or inspired by:

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

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/13.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
39 changes: 39 additions & 0 deletions dms/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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": "13.0.1.0.0",
"category": "Document Management",
"license": "LGPL-3",
"website": "http://github.com/OCA/dms",
"author": "MuK IT,Odoo Community Association (OCA)",
"depends": ["web_drop_target", "mail", "http_routing"],
"data": [
"security/security.xml",
"security/ir.model.access.csv",
"actions/file.xml",
"template/assets.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",
],
"qweb": ["static/src/xml/views.xml"],
"demo": [
"demo/res_users.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>
1 change: 1 addition & 0 deletions dms/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
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.ref(
"dms.document_onboarding_directory_panel"
).render(
{
"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.ref("dms.document_onboarding_file_panel").render(
{
"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=""
)
}
31 changes: 31 additions & 0 deletions dms/demo/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 noupdate="1">
<record id="category_01_demo" model="dms.category">
<field name="name">Internal</field>
</record>
<record id="category_02_demo" model="dms.category">
<field name="name">Human Resource</field>
<field name="parent_id" ref="dms.category_01_demo" />
</record>
<record id="category_03_demo" model="dms.category">
<field name="name">Contracts</field>
<field name="parent_id" ref="dms.category_02_demo" />
</record>
<record id="category_04_demo" model="dms.category">
<field name="name">Traveling</field>
<field name="parent_id" ref="dms.category_02_demo" />
</record>
<record id="category_05_demo" model="dms.category">
<field name="name">External</field>
</record>
<record id="category_06_demo" model="dms.category">
<field name="name">News</field>
<field name="parent_id" ref="dms.category_05_demo" />
</record>
</odoo>
Binary file added dms/demo/data/audio01.wav
Binary file not shown.
Binary file added dms/demo/data/audio02.wav
Binary file not shown.
Binary file added dms/demo/data/audio03.mp3
Binary file not shown.
Binary file added dms/demo/data/audio04.mp3
Binary file not shown.
10 changes: 10 additions & 0 deletions dms/demo/data/code01.aj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// HelloWorld.java
public class HelloWorld {
public static void say(String message) {
System.out.println(message);
}

public static void sayToPerson(String message, String name) {
System.out.println(name + ", " + message);
}
}
9 changes: 9 additions & 0 deletions dms/demo/data/code02.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
##
##
## Copyright 2017-2019 MuK IT GmbH
## License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
##
##
STR="Hello World!"
echo $STR
12 changes: 12 additions & 0 deletions dms/demo/data/code03.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
*
* Copyright 2017-2019 MuK IT GmbH
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
*
*/
#include <stdio.h>

int main(void)
{
printf("hello, world\n");
}
13 changes: 13 additions & 0 deletions dms/demo/data/code04.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
*
* Copyright 2017-2019 MuK IT GmbH
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
*
*/
#include <iostream>

int main()
{
std::cout << "Hello, world!\n";
return 0;
}
13 changes: 13 additions & 0 deletions dms/demo/data/code05.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Copyright 2017-2019 MuK IT GmbH
// License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
//
using System;

class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
}
5 changes: 5 additions & 0 deletions dms/demo/data/code06.cbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. hello-world.
PROCEDURE DIVISION.
DISPLAY "Hello, world!"
.
1 change: 1 addition & 0 deletions dms/demo/data/code07.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log "Hello, World!"
3 changes: 3 additions & 0 deletions dms/demo/data/code08.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
program helloworld
print *, "Hello world!"
end program helloworld
7 changes: 7 additions & 0 deletions dms/demo/data/code09.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("Hello, World")
}
7 changes: 7 additions & 0 deletions dms/demo/data/code10.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**********************************************************************************
*
* Copyright 2017-2019 MuK IT GmbH
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
*
**********************************************************************************/
println "Hello World"
11 changes: 11 additions & 0 deletions dms/demo/data/code11.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**********************************************************************************
*
* Copyright 2017-2019 MuK IT GmbH
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
*
**********************************************************************************/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Prints the string to the console.
}
}
3 changes: 3 additions & 0 deletions dms/demo/data/code12.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
object HelloWorld extends App {
println("Hello, World!")
}
Binary file added dms/demo/data/document01.pdf
Binary file not shown.
Binary file added dms/demo/data/document02.doc
Binary file not shown.
Binary file added dms/demo/data/document03.odt
Binary file not shown.
23 changes: 23 additions & 0 deletions dms/demo/data/document04.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\f73\froman\fcharset238\fprq2 Times New Roman CE;}{\f74\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f76\froman\fcharset161\fprq2 Times New Roman Greek;}{\f77\froman\fcharset162\fprq2 Times New Roman Tur;}
{\f78\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f79\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f80\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f81\fswiss\fcharset238\fprq2 Arial CE;}{\f82\fswiss\fcharset204\fprq2 Arial Cyr;}
{\f84\fswiss\fcharset161\fprq2 Arial Greek;}{\f85\fswiss\fcharset162\fprq2 Arial Tur;}{\f86\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f87\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f88\fswiss\fcharset186\fprq2 Arial Baltic;}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red51\green102\blue255;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang2057\langfe1033\kerning32\cgrid\langnp2057\langfenp1033
\sbasedon0 \snext0 heading 1;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs10 \additive
Default Paragraph Font;}}{\info{\title The power of technology lies in the ability to match learning styles to the needs of individual learners}{\author Les Mason}{\operator Les Mason}{\creatim\yr2005\mo3\dy15\hr18\min11}
{\revtim\yr2005\mo3\dy15\hr18\min12}{\version1}{\edmins1}{\nofpages1}{\nofwords0}{\nofchars0}{\nofcharsws0}{\vern8203}}\paperw11906\paperh16838 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin
\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1\jexpand\viewkind1\viewscale117\viewzk2\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd
\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang
{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7
\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain
\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang2057\langfe1033\kerning32\cgrid\langnp2057\langfenp1033 {
The power of technology lies in the ability to match learning styles to the needs of individual learners
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {
\par }\pard\plain \s3\ql \li720\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin720\itap0 \b\f1\fs26\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\cf17 The more I study the more I l}{\cf17 earn.
\par The more I learn the more I know
\par The more I know the more I forget
\par The more I forget the less I know
\par So why study?}{
\par }}
Binary file added dms/demo/data/image01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dms/demo/data/image02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dms/demo/data/image03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dms/demo/data/image04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading