add .travis.yml

This commit is contained in:
Yannick Vaucher
2014-07-04 14:56:05 +02:00
parent b9f24ecbee
commit 79b3da3cfb
2 changed files with 37 additions and 8 deletions

30
.travis.yml Normal file
View File

@@ -0,0 +1,30 @@
language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update
- sudo apt-get install libcups2-dev cups
install:
- git clone https://github.com/OCA/maintainer-quality-tools.git $HOME/maintainer-quality-tools
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
- $HOME/maintainer-quality-tools/travis/travis_install_nightly 7.0
- pip install coveralls flake8
- pip install pycups==1.9.66
- pip install PyPDF2==1.18
- pip install requests
- git clone https://github.com/OCA/reporting-engine -b 7.0 $HOME/reporting-engine
services:
- postgresql
script:
- travis_run_flake8
- travis_run_tests 7.0 openerp_test $HOME/reporting-engine
after_success:
coveralls

View File

@@ -42,7 +42,7 @@ class ir_attachment(orm.Model):
[('1', 'Priority'), ('2', 'Economy')],
'Speed',
help="Defines the sending speed if the document is automatically sent"),
'pingen_color': fields.selection( [('0', 'B/W'), ('1', 'Color')], 'Type of print'),
'pingen_color': fields.selection([('0', 'B/W'), ('1', 'Color')], 'Type of print'),
}
_defaults = {
@@ -78,17 +78,17 @@ class ir_attachment(orm.Model):
document.write({'state': 'pending'}, context=context)
else:
pingen_document_obj.create(
cr, uid,
self._prepare_pingen_document_vals(
cr, uid, attachment, context=context),
context=context)
cr, uid,
self._prepare_pingen_document_vals(
cr, uid, attachment, context=context),
context=context)
else:
if document:
if document.state == 'pushed':
raise osv.except_osv(
_('Error'),
_('The attachment %s is already pushed to pingen.com.') % \
attachment.name)
_('The attachment %s is already pushed to pingen.com.') %
attachment.name)
document.write({'state': 'canceled'}, context=context)
return
@@ -121,4 +121,3 @@ class ir_attachment(orm.Model):
raise Exception(
'The type of attachment %s is not handled' % attachment.type)
return decoded_document