Skip to content

Commit

Permalink
Merge pull request #7 from dreispt/port-issue
Browse files Browse the repository at this point in the history
Port project_issue_department to v8
  • Loading branch information
dreispt committed Jul 18, 2014
2 parents a3a1bcd + 4719695 commit 4d1b2a1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 41 deletions.
48 changes: 13 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,23 @@
# Config file .travis.yml

language: python

python:
# - "pypy" # not supported by odoo 8
# - "3.4" # not supported by odoo 8
# - "3.3" # not supported by odoo 8
- "2.7"
# - "2.6" # not supported by odoo 8
- "2.7"

env:
- ODOO="https://github.com/savoirfairelinux/odoo/archive/setuptools-addons.tar.gz" # Temp until https://github.com/odoo/odoo/issues/185 or https://github.com/odoo/odoo/issues/441 is fixed
# - ODOO="https://github.com/odoo/odoo/archive/master.tar.gz"
# - ODOO="https://github.com/OCA/OCB/archive/master.zip"
virtualenv:
system_site_packages: true

# Need coveralls for coverage reports
# Need flake8 for pep8 testing
# Manually get PyChart
# Install tested version of odoo (official or ocb)
# Get modules from other repos which have dependencies (in this case travel requires modules from lp:partner-contact-management and lp:openerp-hr
install:
- pip install coveralls flake8
- pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
- pip install ${ODOO}
env:
- VERSION="8.0" ODOO_REPO="odoo/odoo"
- VERSION="master" ODOO_REPO="OCA/OCB"

# Create databae
# Pre-install modules and dependencies
before_script:
- createdb test
- sudo python -m smtpd -n -c DebuggingServer localhost:25 &
install:
- git clone --branch edge https://github.com/dreispt/maintainer-quality-tools.git $HOME/maintainer-quality-tools
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
- travis_install_nightly $VERSION
- $HOME/maintainer-quality-tools/travis/travis_install_nightly ${VERSION}

# Test with flake, ignore F401 for __init__.py files, use a max length of 120
# Run tests with coverage
# Only test modules in repo (list populated by directories in repo)
# Preload modules before testing to only run tests of repo's modules
# Include current directory and dependent repos in addons-path as well as official addons
script:
- flake8 . --max-line-length=120 --exclude=__unported__ --filename=__init__.py --ignore=F401
- flake8 . --max-line-length=120 --exclude=__unported__,__init__.py
- odoo.py -d test --stop-after-init --init=$(python -c 'import os; print(",".join(x for x in os.listdir(".") if os.path.isdir(x) and not x.startswith(".") and x != "__unported__"))') --addons-path=$(pwd),`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/addons
- coverage run $(which odoo.py) -d test --test-enable --log-level=test --stop-after-init --init=$(python -c 'import os; print(",".join(x for x in os.listdir(".") if os.path.isdir(x) and not x.startswith(".") and x != "__unported__"))') --addons-path=$(pwd),`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/addons
- travis_run_flake8
- travis_run_tests ${VERSION}

after_success:
coveralls
3 changes: 0 additions & 3 deletions __unported__/project_issue_department/__init__.py

This file was deleted.

2 changes: 2 additions & 0 deletions project_issue_department/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import project_issue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'project_issue_view.xml',
'security/ir.model.access.csv',
],
'installable': False,
'installable': True,
'application': False,
'auto_install': True,
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="model">project.issue</field>
<field name="inherit_id" ref="project_issue.project_issue_form_view"/>
<field name="arch" type="xml">
<field name="priority" position="after">
<field name="id" position="after">
<field name="department_id"/>
</field>
</field>
Expand Down Expand Up @@ -37,7 +37,7 @@
<field name="inherit_id" ref="project_issue.project_issue_tree_view"/>
<field name="arch" type="xml">
<data>
<field name="user_id" position="after">
<field name="partner_id" position="before">
<field name="department_id"/>
</field>
</data>
Expand Down

0 comments on commit 4d1b2a1

Please sign in to comment.