mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
add .travis.yml
This commit is contained in:
30
.travis.yml
Normal file
30
.travis.yml
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user