diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..dd4a863 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/pingen/ir_attachment.py b/pingen/ir_attachment.py index cbb950d..ba00c47 100644 --- a/pingen/ir_attachment.py +++ b/pingen/ir_attachment.py @@ -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 -