mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] updated travis and readme
This commit is contained in:
18
.travis.yml
18
.travis.yml
@@ -14,16 +14,22 @@ python:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- VERSION="8.0" LINT_CHECK="1"
|
global:
|
||||||
- VERSION="8.0" ODOO_REPO="odoo/odoo" UNIT_TEST="1" LINT_CHECK="0"
|
- VERSION="8.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
|
||||||
- VERSION="8.0" ODOO_REPO="OCA/OCB" UNIT_TEST="1" LINT_CHECK="0"
|
- TRANSIFEX_USER='transbot@odoo-community.org'
|
||||||
|
- secure: HwYn7vV4wIM4ocObmgkylZmaw6FQynkbMiJmoTTfgL3y3Gy6IAPVXgTNXFUiIuYXZZ4B2GOAfcECQejCCw2KP7OCcBo1oGNuSJ2aVwiQcRH1ENDLTsMq1jcB/4vQuAmTS8WEE5nRkPyutwgE4kBYvZC4tENatakafPRAS+iNqpQ=
|
||||||
|
matrix:
|
||||||
|
- LINT_CHECK="1"
|
||||||
|
- TRANSIFEX="1"
|
||||||
|
- TESTS="1" ODOO_REPO="odoo/odoo"
|
||||||
|
- TESTS="1" ODOO_REPO="OCA/OCB"
|
||||||
|
|
||||||
virtualenv:
|
virtualenv:
|
||||||
system_site_packages: true
|
system_site_packages: true
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git clone https://github.com/OCA/maintainer-quality-tools.git $HOME/maintainer-quality-tools
|
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
|
||||||
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
|
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
|
||||||
- travis_install_nightly
|
- travis_install_nightly
|
||||||
- pip install pycups==1.9.66
|
- pip install pycups==1.9.66
|
||||||
- pip install PyPDF2==1.18
|
- pip install PyPDF2==1.18
|
||||||
@@ -34,4 +40,4 @@ script:
|
|||||||
- travis_run_tests
|
- travis_run_tests
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
coveralls
|
- travis_after_tests_success
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
[](https://runbot.odoo-community.org/runbot/repo/github-com-oca-report-print-send-144)
|
||||||
[](https://travis-ci.org/OCA/report-print-send)
|
[](https://travis-ci.org/OCA/report-print-send)
|
||||||
[](https://coveralls.io/r/OCA/report-print-send?branch=8.0)
|
[](https://coveralls.io/r/OCA/report-print-send?branch=8.0)
|
||||||
|
|
||||||
|
|||||||
@@ -21,21 +21,22 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
import logging
|
|
||||||
_logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
|
|
||||||
|
from openerp import models, fields, api, _
|
||||||
|
from openerp.exceptions import Warning
|
||||||
|
from openerp.tools.config import config
|
||||||
|
|
||||||
|
import logging
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cups
|
import cups
|
||||||
except ImportError:
|
except ImportError:
|
||||||
_logger.debug('Cannot `import cups`.')
|
_logger.debug('Cannot `import cups`.')
|
||||||
|
|
||||||
from openerp import models, fields, api, _
|
|
||||||
from openerp.exceptions import Warning
|
|
||||||
from openerp.tools.config import config
|
|
||||||
|
|
||||||
CUPS_HOST = config.get('cups_host', 'localhost')
|
CUPS_HOST = config.get('cups_host', 'localhost')
|
||||||
CUPS_PORT = int(config.get('cups_port', 631)) # config.get returns a string
|
CUPS_PORT = int(config.get('cups_port', 631)) # config.get returns a string
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ def exp_report_get(db, uid, report_id):
|
|||||||
action = data['action']
|
action = data['action']
|
||||||
printer = data['printer']
|
printer = data['printer']
|
||||||
if action != 'client':
|
if action != 'client':
|
||||||
if (self_reports and self_reports.get(report_id)
|
if (self_reports and self_reports.get(report_id) and
|
||||||
and self_reports[report_id].get('result')
|
self_reports[report_id].get('result') and
|
||||||
and self_reports[report_id].get('format')):
|
self_reports[report_id].get('format')):
|
||||||
printer.print_document(report,
|
printer.print_document(report,
|
||||||
self_reports
|
self_reports
|
||||||
[report_id]['result'],
|
[report_id]['result'],
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
from openerp.exceptions import Warning
|
||||||
|
from openerp import models, api, _
|
||||||
|
from openerp.tools.config import config
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -29,10 +33,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
_logger.debug('Cannot `import cups`.')
|
_logger.debug('Cannot `import cups`.')
|
||||||
|
|
||||||
from openerp.exceptions import Warning
|
|
||||||
from openerp import models, api, _
|
|
||||||
from openerp.tools.config import config
|
|
||||||
|
|
||||||
CUPS_HOST = config.get('cups_host', 'localhost')
|
CUPS_HOST = config.get('cups_host', 'localhost')
|
||||||
CUPS_PORT = int(config.get('cups_port', 631))
|
CUPS_PORT = int(config.get('cups_port', 631))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user