From 610e3c8a709d5005f1758dbde7fc0ca67a1c3ce0 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Tue, 13 Dec 2016 10:49:21 -0800 Subject: [PATCH 1/4] [FIX] travis: Update travis file to new standard * Add new matrix * Add transifex support * Switch coveralls to travis_after_tests_success * Move pip requirements to requirements.txt --- .travis.yml | 18 +++++++++++++----- requirements.txt | 3 +++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index 874596b9..c3406024 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,25 @@ language: python +sudo: false +cache: + apt: true + directories: + - $HOME/.cache/pip python: - "2.7" -sudo: false -cache: pip - addons: apt: + sources: + - pov-wkhtmltopdf packages: - expect-dev # provides unbuffer utility - python-lxml # because pip installation is slow + - wkhtmltopdf + +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" env: global: @@ -28,11 +37,10 @@ virtualenv: system_site_packages: true 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} - travis_install_nightly - printf '[options]\n\nrunning_env = dev' > ${HOME}/.openerp_serverrc - - pip install unidecode pyserial pycountry script: - travis_run_tests diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..de510661 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +unidecode +pyserial +pycountry From 3196594399a8030fc6bc4ff8b2acf9fed9ef0c58 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Tue, 13 Dec 2016 11:59:23 -0800 Subject: [PATCH 2/4] [FIX] hw_customer_display: Add guard for external import --- hw_customer_display/controllers/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw_customer_display/controllers/main.py b/hw_customer_display/controllers/main.py index f6e4358b..f3bc5c95 100644 --- a/hw_customer_display/controllers/main.py +++ b/hw_customer_display/controllers/main.py @@ -39,6 +39,12 @@ except (ImportError, IOError) as err: logger.debug(err) +try: + from unidecode import unidecode +except ImportError: + logger.info('`unidecode` Python pacakge not found') + + class CustomerDisplayDriver(Thread): def __init__(self): Thread.__init__(self) From 79b016b479cdff627c8ddc747b00856b1d82d4b1 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Tue, 13 Dec 2016 12:00:24 -0800 Subject: [PATCH 3/4] [FIX] hw_telium_payment_terminal: Add guard for external import --- hw_telium_payment_terminal/controllers/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw_telium_payment_terminal/controllers/main.py b/hw_telium_payment_terminal/controllers/main.py index d40232b0..27ae84cc 100644 --- a/hw_telium_payment_terminal/controllers/main.py +++ b/hw_telium_payment_terminal/controllers/main.py @@ -40,6 +40,12 @@ except (ImportError, IOError) as err: logger.debug(err) +try: + import pycountry +except ImportError: + _logger.info('`pycountry` Python package not found') + + class TeliumPaymentTerminalDriver(Thread): def __init__(self): Thread.__init__(self) From 9e741a4cd2ecd01413b9dcc7ea8c99fa6edc2e31 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 28 Apr 2018 13:29:52 +0200 Subject: [PATCH 4/4] [FIX] por_order_to_sale_order: PEP8 --- pos_order_to_sale_order/models/sale_order.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pos_order_to_sale_order/models/sale_order.py b/pos_order_to_sale_order/models/sale_order.py index b76ae7ba..4744c215 100644 --- a/pos_order_to_sale_order/models/sale_order.py +++ b/pos_order_to_sale_order/models/sale_order.py @@ -39,15 +39,15 @@ class SaleOrder(models.Model): qty=line_data['qty'], partner_id=sale_order_data['partner_id'])['value'] res.update({ - 'product_id': line_data['product_id'], - 'product_uom_qty': line_data['qty'], - 'discount': line_data['discount'], - 'tax_id': [(6, False, res['tax_id'])], + 'product_id': line_data['product_id'], + 'product_uom_qty': line_data['qty'], + 'discount': line_data['discount'], + 'tax_id': [(6, False, res['tax_id'])], }) if self.env.context.get('is_pos_pricelist'): res.update({ - 'price_unit': line_data['price_unit'], - 'tax_id': line_data['tax_ids'], + 'price_unit': line_data['price_unit'], + 'tax_id': line_data['tax_ids'], }) return res