Skip to content

Commit

Permalink
Merge 890b756 into f516310
Browse files Browse the repository at this point in the history
  • Loading branch information
David Dufresne committed Aug 29, 2016
2 parents f516310 + 890b756 commit 49e6e54
Show file tree
Hide file tree
Showing 50 changed files with 2,931 additions and 12 deletions.
31 changes: 21 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,26 @@ language: python
python:
- "2.7"

sudo: false
cache: pip

addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow

env:
- VERSION="8.0" LINT_CHECK="1"
- VERSION="8.0" ODOO_REPO="odoo/odoo" LINT_CHECK="0"
- VERSION="8.0" ODOO_REPO="OCA/OCB" LINT_CHECK="0"
# either use the two lines above or the two below. Don't change the default if
# it's not necessary (it is only necessary if modules in your repository can't
# be installed in the same database. And you get a huge speed penalty in your
# tests)
# - VERSION="8.0" ODOO_REPO="odoo/odoo" UNIT_TEST="1" LINT_CHECK="0"
# - VERSION="8.0" ODOO_REPO="OCA/OCB" UNIT_TEST="1" LINT_CHECK="0"
global:
- VERSION="8.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
- TRANSIFEX_USER='transbot@odoo-community.org'
- secure: 'O9vOlcJJUccY3UuGUsXbAQwIn8uo6AMGcnFM9rUfg3TWy5NqAYwCp1jb3d3TX/+ANKUMVOGqbiR32qJ0IVI5T9vCY0/zwvsJhPZNPAAZvWYxkRibDk2uBJfQC9l04oU0AUhgFua6IIkOTLATrTndpENMrires9l+4W5h1e5XggA='

matrix:
- LINT_CHECK="1"
- TRANSIFEX="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="OCA/OCB"

virtualenv:
system_site_packages: true
Expand All @@ -21,9 +31,10 @@ install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
- pip install python-redmine

script:
- travis_run_tests

after_success:
coveralls
- travis_after_tests_success
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[![Build Status](https://travis-ci.org/OCA/connector-redmine.svg?branch=8.0)](https://travis-ci.org/OCA/connector-redmine)
[![Coverage Status](https://coveralls.io/repos/OCA/connector-redmine/badge.png?branch=8.0)](https://coveralls.io/r/OCA/connector-redmine?branch=8.0)
[![Build Status](https://travis-ci.org/OCA/connector-redmine.svg?branch=7.0)](https://travis-ci.org/OCA/connector-redmine)
[![Coverage Status](https://coveralls.io/repos/OCA/connector-redmine/badge.svg?branch=7.0)](https://coveralls.io/r/OCA/connector-redmine?branch=7.0)
[![Code Climate](https://codeclimate.com/github/OCA/connector-redmine/badges/gpa.svg)](https://codeclimate.com/github/OCA/connector-redmine)

# Connector with Redmine

Odoo modules to connect with Redmine (http://redmine.org) based on various scenario.

[//]: # (addons)
[//]: # (end addons)

93 changes: 93 additions & 0 deletions connector_redmine/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. 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

=================
Redmine Connector
=================

Base connector module for Redmine.

It allows the authentication to a Redmine instance using the REST API.

It also defines a method getUser that searches for the Redmine user related
to the Odoo user.

Be aware that the user login must be the same in both systems.

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

# Install Redmine
Refer to http://www.redmine.org/projects/redmine/wiki/redmineinstall

# Install python-redmine
sudo pip install python-redmine


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

# Go to Connectors -> Redmine -> Backends

# Create a backend
- Location: the url of the Redmine service
- Key: the REST API key of your Redmine instance

# Click on the button to test the connection

Usage
=====

To use this module, you need to:

#. Go to ...

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/169/8.0

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

- None

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

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/connector-redmine/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.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
* Virgil Dupras <virgil.dupras@savoirfairelinux.com>
* Guillaume Auger <guillaume.auger@savoirfairelinux.com>
* David Dufresne <david.dufresne@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 https://odoo-community.org.
8 changes: 8 additions & 0 deletions connector_redmine/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# © 2016 Savoir-faire Linux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import connector
from . import backend
from . import models
from . import unit
28 changes: 28 additions & 0 deletions connector_redmine/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# © 2016 Savoir-faire Linux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
'name': 'Redmine Connector',
'version': '8.0.1.0.0',
'author': 'Savoir-faire Linux,Odoo Community Association (OCA)',
'maintainer': 'Odoo Community Association (OCA)',
'website': 'http://odoo-community.org',
'category': 'Connector',
'license': 'AGPL-3',
'depends': [
'connector',
'hr_timesheet_sheet',
],
'external_dependencies': {
'python': ['redmine'],
},
'data': [
'security/ir.model.access.csv',
'views/redmine_backend_view.xml',
'views/redmine_menu.xml',
'views/res_users.xml',
],
'application': True,
'installable': True,
}
12 changes: 12 additions & 0 deletions connector_redmine/backend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# © 2016 Savoir-faire Linux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import openerp.addons.connector.backend as backend


redmine = backend.Backend('redmine')
""" Generic Redmine Backend """

redmine13 = backend.Backend(parent=redmine, version='1.3')
""" Redmine Backend for version 1.3 and up """
21 changes: 21 additions & 0 deletions connector_redmine/connector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# © 2016 Savoir-faire Linux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp.addons.connector.connector import ConnectorEnvironment
from openerp.addons.connector.checkpoint import checkpoint


def get_environment(session, model_name, backend_id):
""" Create an environment to work with. """
backend_record = session.env['redmine.backend'].browse(backend_id)
env = ConnectorEnvironment(backend_record, session, model_name)
lang = backend_record.default_lang_id
lang_code = lang.code if lang else 'en_US'
session.change_context(lang=lang_code)
return env


def add_checkpoint(session, model_name, record_id, backend_id):
return checkpoint.add_checkpoint(
session, model_name, record_id, 'redmine.backend', backend_id)
169 changes: 169 additions & 0 deletions connector_redmine/i18n/en.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * connector_redmine
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: connector-redmine (7.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-24 15:16+0000\n"
"PO-Revision-Date: 2015-05-29 03:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: English (http://www.transifex.com/oca/OCA-connector-redmine-7-0/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: connector_redmine
#: view:redmine.backend:0
msgid "Redmine Configuration"
msgstr "Redmine Configuration"

#. module: connector_redmine
#: field:redmine.binding,sync_date:0
#: field:redmine.hr.analytic.timesheet,sync_date:0
msgid "Last Synchronization Date"
msgstr "Last Synchronization Date"

#. module: connector_redmine
#: model:ir.ui.menu,name:connector_redmine.menu_redmine_root
msgid "Redmine"
msgstr "Redmine"

#. module: connector_redmine
#: field:redmine.backend,location:0
msgid "Location"
msgstr "Location"

#. module: connector_redmine
#: model:ir.model,name:connector_redmine.model_redmine_binding
msgid "Redmine Binding (Abstract)"
msgstr "Redmine Binding (Abstract)"

#. module: connector_redmine
#: field:redmine.binding,redmine_id:0
#: field:redmine.hr.analytic.timesheet,redmine_id:0
msgid "ID in Redmine"
msgstr "ID in Redmine"

#. module: connector_redmine
#: code:addons/connector_redmine/unit/backend_adapter.py:63
#, python-format
msgid "A network error caused the failure of the job: %s"
msgstr "A network error caused the failure of the job: %s"

#. module: connector_redmine
#: model:ir.actions.act_window,name:connector_redmine.action_redmine_backend
#: model:ir.model,name:connector_redmine.model_redmine_backend
#: view:redmine.backend:0 field:redmine.binding,backend_id:0
#: field:redmine.hr.analytic.timesheet,backend_id:0
msgid "Redmine Backend"
msgstr "Redmine Backend"

#. module: connector_redmine
#: field:redmine.hr.analytic.timesheet,openerp_id:0
msgid "Timesheet"
msgstr "Timesheet"

#. module: connector_redmine
#: field:redmine.binding,updated_on:0
#: field:redmine.hr.analytic.timesheet,updated_on:0
msgid "Last Update in Redmine"
msgstr "Last Update in Redmine"

#. module: connector_redmine
#: view:redmine.backend:0
msgid "Test Authentication"
msgstr "Test Authentication"

#. module: connector_redmine
#: code:addons/connector_redmine/models/redmine_backend.py:86
#, python-format
msgid "Everything seems properly set up"
msgstr "Everything seems properly set up"

#. module: connector_redmine
#: field:redmine.backend,key:0
msgid "Key"
msgstr "Key"

#. module: connector_redmine
#: field:redmine.backend,version:0
msgid "Version"
msgstr "Version"

#. module: connector_redmine
#: field:redmine.backend,name:0
msgid "Name"
msgstr "Name"

#. module: connector_redmine
#: model:ir.model,name:connector_redmine.model_redmine_hr_analytic_timesheet
msgid "Redmine Time Entry Binding"
msgstr "Redmine Time Entry Binding"

#. module: connector_redmine
#: model:ir.model,name:connector_redmine.model_connector_redmine_installed
msgid "connector_redmine.installed"
msgstr "connector_redmine.installed"

#. module: connector_redmine
#: code:addons/connector_redmine/unit/backend_adapter.py:81
#, python-format
msgid "No user with login %s found in Redmine."
msgstr "No user with login %s found in Redmine."

#. module: connector_redmine
#: code:addons/connector_redmine/models/redmine_backend.py:37
#, python-format
msgid "1.3 and higher"
msgstr "1.3 and higher"

#. module: connector_redmine
#: field:redmine.backend,default_lang_id:0
msgid "Default Language"
msgstr "Default Language"

#. module: connector_redmine
#: code:addons/connector_redmine/models/redmine_backend.py:83
#, python-format
msgid "Error"
msgstr "Error"

#. module: connector_redmine
#: view:redmine.backend:0
msgid "e.g. http://localhost:8081/redmine"
msgstr "e.g. http://localhost:8081/redmine"

#. module: connector_redmine
#: code:addons/connector_redmine/models/redmine_backend.py:85
#, python-format
msgid "Connection test succeeded"
msgstr "Connection test succeeded"

#. module: connector_redmine
#: code:addons/connector_redmine/unit/backend_adapter.py:58
#, python-format
msgid "Redmine connection Error: Invalid authentications key."
msgstr "Redmine connection Error: Invalid authentications key."

#. module: connector_redmine
#: code:addons/connector_redmine/models/redmine_backend.py:83
#, python-format
msgid "Could not connect to Redmine"
msgstr "Could not connect to Redmine"

#. module: connector_redmine
#: model:ir.ui.menu,name:connector_redmine.menu_redmine_backend
msgid "Backends"
msgstr "Backends"

#. module: connector_redmine
#: help:redmine.backend,default_lang_id:0
msgid ""
"If a default language is selected, the records will be imported in the translation of this language.\n"
"Note that a similar configuration exists for each storeview."
msgstr "If a default language is selected, the records will be imported in the translation of this language.\nNote that a similar configuration exists for each storeview."

0 comments on commit 49e6e54

Please sign in to comment.