-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
887 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
====================================== | ||
Attach files from a remote CMIS Server | ||
====================================== | ||
|
||
This module allows you to use the CMIS backend to search in the DMS repository | ||
and attach documents to OpenERP records. | ||
|
||
Installation | ||
============ | ||
|
||
You need to install the CMIS python library: | ||
|
||
pip install cmislib | ||
|
||
Configuration | ||
============= | ||
|
||
Create a new CMIS backend with the host, login and password. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module: | ||
|
||
* On one OpenERP record, click "Add from DMS". | ||
* Type your query and then click on "Search". | ||
* Filter your results if necessary | ||
* Select the documents you want to attach | ||
* Selected documents will be enqueued for importing | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/104/7.0 | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* https://github.com/OCA/connector-cmis/issues | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/connector-cmis/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/connector-cmis/issues/new?body=module:%20 | ||
cmis_read%0Aversion:%20 | ||
7.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* El Hadji Dem (elhadji.dem@savoirfairelinux.com) | ||
* Maxime Chambreuil (maxime.chambreuil@savoirfairelinux.com) | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
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. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# This module copyright (C) 2014 Savoir-faire Linux | ||
# (<http://www.savoirfairelinux.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# This module copyright (C) 2014 Savoir-faire Linux | ||
# (<http://www.savoirfairelinux.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
{ | ||
'name': 'CMIS Read', | ||
'version': '7.0.1.0.0', | ||
'category': 'Knowledge Management', | ||
'summary': 'Store Document File from a Remote CMIS Server', | ||
'description': """ | ||
====================================== | ||
Attach files from a remote CMIS Server | ||
====================================== | ||
This module allows you to use the CMIS backend to search in the DMS repository | ||
and attach documents to OpenERP records. | ||
Installation | ||
============ | ||
You need to install the CMIS python library: | ||
pip install cmislib | ||
Configuration | ||
============= | ||
Create a new CMIS backend with the host, login and password. | ||
Usage | ||
===== | ||
* On one OpenERP record, click "Add from DMS". | ||
* Type your query and then click on "Search". | ||
* Filter your results if necessary | ||
* Select the documents you want to attach | ||
* Selected documents will be enqueued for importing | ||
Contributors | ||
------------ | ||
* El Hadji Dem (elhadji.dem@savoirfairelinux.com) | ||
* Maxime Chambreuil (maxime.chambreuil@savoirfairelinux.com) | ||
""", | ||
'author': 'Savoir-faire Linux, Odoo Community Association (OCA)', | ||
'website': 'www.savoirfairelinux.com', | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'document', | ||
'cmis' | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'wizard/ir_attachment_dms_view.xml', | ||
], | ||
'js': [ | ||
'static/src/js/document.js' | ||
], | ||
'qweb': [ | ||
'static/src/xml/document.xml' | ||
], | ||
'test': [], | ||
'demo': [ | ||
], | ||
'installable': True, | ||
'auto_install': False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Translation of OpenERP Server. | ||
# This file contains the translation of the following modules: | ||
# * cmis_read | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: OpenERP Server 7.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2014-03-21 14:55+0000\n" | ||
"PO-Revision-Date: 2014-03-21 10:55-0500\n" | ||
"Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: \n" | ||
"X-Generator: Poedit 1.5.4\n" | ||
|
||
#. module: cmis_read | ||
#: field:ir.attachment.dms,file_id:0 | ||
msgid "File ID" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: field:ir.attachment.dms.wizard,attachment_ids:0 | ||
msgid "Attachments" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "Search Document" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: field:ir.attachment.dms,name:0 help:ir.attachment.dms,name:0 | ||
#: field:ir.attachment.dms.wizard,name:0 help:ir.attachment.dms.wizard,name:0 | ||
msgid "File name" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: code:addons/cmis_read/wizard/document_wizard.py:59 | ||
#, python-format | ||
msgid "You have to fill in the file name. And try again" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: help:ir.attachment.dms,file_id:0 | ||
msgid "File Id" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: model:_description:0 model:ir.model,name:cmis_read.model_ir_attachment_dms | ||
msgid "ir.attachment.dms" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: field:ir.attachment.dms,owner:0 help:ir.attachment.dms,owner:0 | ||
msgid "Owner" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "" | ||
"This action allows you to search by file name and to add the document you " | ||
"select" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#. openerp-web | ||
#: code:addons/cmis_read/static/src/js/document.js:26 | ||
#, python-format | ||
msgid "Search Document from DMS" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#. openerp-web | ||
#: code:addons/cmis_read/static/src/xml/document.xml:7 | ||
#, python-format | ||
msgid "Add Doc from DMS..." | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: code:addons/cmis_read/wizard/document_wizard.py:58 | ||
#: code:addons/cmis_read/wizard/document_wizard.py:86 | ||
#, python-format | ||
msgid "Error" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "Cancel" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "Apply" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: model:_description:0 | ||
#: model:ir.model,name:cmis_read.model_ir_attachment_dms_wizard | ||
msgid "ir.attachment.dms.wizard" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "Search" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: view:ir.attachment.dms.wizard:0 | ||
msgid "or" | ||
msgstr "" | ||
|
||
#. module: cmis_read | ||
#: code:addons/cmis_read/wizard/document_wizard.py:87 | ||
#, python-format | ||
msgid "You have to select at least 1 Document. And try again" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_ir_attachment_dms_wizard,access_ir_attachment_dms_wizard,model_ir_attachment_dms_wizard,base.group_document_user,1,1,1,1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
openerp.cmis_read = function(instance, m) { | ||
var _t = instance.web._t, | ||
QWeb = instance.web.qweb; | ||
|
||
instance.web.Sidebar.include({ | ||
redraw: function() { | ||
var self = this; | ||
this._super.apply(this, arguments); | ||
self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('AddDocfromdms', {widget: self})) | ||
self.$el.find('.oe_sidebar_add_dms_doc').on('click', function (e) { | ||
self.on_cmis_doc(); | ||
}); | ||
}, | ||
on_cmis_doc: function(state) { | ||
var self = this; | ||
var view = self.getParent(); | ||
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ]; | ||
var ds = new instance.web.DataSet(this, 'ir.attachment', context); | ||
// you can pass in other data using the context dictionary variable | ||
var context = { | ||
'model': view.dataset.model, | ||
'ids': ids, | ||
}; | ||
// the action dictionary variable sends data in the "self.do_action" method | ||
var action = { | ||
name: _t("Search Document from DMS"), | ||
type: 'ir.actions.act_window', | ||
res_model: 'ir.attachment.dms.wizard', | ||
view_mode: 'form', | ||
view_type: 'form', | ||
views: [[false, 'form']], | ||
target: 'new', | ||
context: context, | ||
}; | ||
// self.do_action accepts the action parameter and opens the new view | ||
self.do_action(action, { | ||
// refresh list of documents | ||
on_close: function () { | ||
self.do_attachement_update(self.dataset, self.model_id); | ||
} | ||
}); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- vim:fdl=1: | ||
--> | ||
<templates id="template" xml:space="preserve"> | ||
|
||
<t t-name="AddDocfromdms"> | ||
<li class="oe_sidebar_add_dms_doc"><span><b>Add Doc from DMS...</b></span></li> | ||
</t> | ||
|
||
</templates> |
Oops, something went wrong.