Skip to content

Commit

Permalink
Merge pull request #88 from lepistone/modern-ci
Browse files Browse the repository at this point in the history
modern CI setup from MQT template
  • Loading branch information
yvaucher committed Jun 2, 2016
2 parents 467c5cc + 589d629 commit 02c2e75
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 39 deletions.
34 changes: 20 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
language: python
sudo: false
cache: pip
cache:
apt: true
directories:
- $HOME/.cache/pip

python:
- "2.7"

addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow

language: python

python:
- "2.7"
- python-simplejson
- python-serial
- python-yaml

env:
- VERSION="7.0" ODOO_REPO="odoo/odoo"
- VERSION="7.0" ODOO_REPO="OCA/OCB"
global:
- VERSION="7.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"

matrix:
- LINT_CHECK="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="OCA/OCB"

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
- pip install PyPDF2==1.18
- pip install unidecode
- pip install pycountry
- pip install suds-jurko==0.6
- git clone https://github.com/OCA/stock-logistics-workflow ${HOME}/stock-logistics-workflow -b ${VERSION}
- git clone https://github.com/OCA/partner-contact ${HOME}/partner-contact -b ${VERSION}
- git clone https://github.com/OCA/server-tools ${HOME}/server-tools -b ${VERSION}
- git clone https://github.com/OCA/webkit-tools ${HOME}/webkit-tools -b ${VERSION}

script:
- travis_run_tests

after_success:
coveralls
- travis_after_tests_success
2 changes: 1 addition & 1 deletion base_delivery_carrier_label/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
##############################################################################
{'name': 'Base module for carrier labels',
'version': '1.2',
'version': '7.0.1.2.0',
'author': "Camptocamp,Akretion,Odoo Community Association (OCA)",
'maintainer': 'Camptocamp',
'category': 'version',
Expand Down
4 changes: 2 additions & 2 deletions base_delivery_carrier_label/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def option_ids_change(self, cr, uid, ids, option_ids, carrier_id,
return res
carrier = carrier_obj.browse(cr, uid, carrier_id, context=context)
for available_option in carrier.available_option_ids:
if (available_option.mandatory
and available_option.id not in option_ids[0][2]):
if (available_option.mandatory and
available_option.id not in option_ids[0][2]):
res['warning'] = {
'title': _('User Error !'),
'message': _("You can not remove a mandatory option."
Expand Down
4 changes: 2 additions & 2 deletions delivery_carrier_file_laposte/generator/laposte_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def _get_rows(self, picking, configuration):
line.reference = picking.name
address = picking.address_id
if address:
line.lastname = address.name or (address.partner_id
and address.partner_id.name)
line.lastname = address.name or (address.partner_id and
address.partner_id.name)
# if a company, put company name
if picking.address_id.partner_id.title:
line.company_name = address.partner_id.name
Expand Down
8 changes: 4 additions & 4 deletions delivery_carrier_file_tnt/generator/tnt_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def _get_rows(self, picking, configuration):
line = TNTLine()
line.reference = picking.name
if picking.address_id:
line.name = (picking.address_id.partner_id
and picking.address_id.partner_id.name)
line.name = (picking.address_id.partner_id and
picking.address_id.partner_id.name)
line.contact = picking.address_id.name
line.street1 = picking.address_id.street
line.street2 = picking.address_id.street2
line.zip = picking.address_id.zip
line.state = (picking.address_id.state_id
and picking.address_id.state_id.name)
line.state = (picking.address_id.state_id and
picking.address_id.state_id.name)
line.city = picking.address_id.city
line.country = picking.address_id.country_id.code
line.country_name = picking.address_id.country_id.name
Expand Down
2 changes: 1 addition & 1 deletion delivery_carrier_label_dispatch/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Carrier labels - Picking dispatch (link)',
'version': '1.0',
'version': '7.0.1.0.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'maintainer': 'Camptocamp',
'category': 'version',
Expand Down
4 changes: 2 additions & 2 deletions delivery_carrier_label_dispatch/picking_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def option_ids_change(self, cr, uid, ids, option_ids, carrier_id,
return res
carrier = carrier_obj.browse(cr, uid, carrier_id, context=context)
for available_option in carrier.available_option_ids:
if (available_option.mandatory
and available_option.id not in option_ids[0][2]):
if (available_option.mandatory and
available_option.id not in option_ids[0][2]):
res['warning'] = {
'title': _('User Error !'),
'message': _("You can not remove a mandatory option."
Expand Down
4 changes: 2 additions & 2 deletions delivery_carrier_label_dispatch/wizard/generate_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def _get_dispatch_ids(self, cr, uid, context=None):
if context is None:
context = {}
res = False
if (context.get('active_model') == 'picking.dispatch'
and context.get('active_ids')):
if (context.get('active_model') == 'picking.dispatch' and
context.get('active_ids')):
res = context['active_ids']
return res

Expand Down
2 changes: 1 addition & 1 deletion delivery_carrier_label_gls/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{
'name': 'Delivery Carrier Label GLS',
'version': '0.1',
'version': '7.0.0.1.0',
'author': "Akretion,Odoo Community Association (OCA)",
'maintener': 'Akretion',
'category': 'Warehouse',
Expand Down
8 changes: 4 additions & 4 deletions delivery_carrier_label_gls/report/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ def get_product(self, address_country):

def set_origin_reference(self, parcel, address):
return (
self.product_code
+ parcel['custom_sequence']
+ '0000'
+ address['country_code']
self.product_code +
parcel['custom_sequence'] +
'0000' +
address['country_code']
)

def validate_mako(self, template, available_keys):
Expand Down
2 changes: 1 addition & 1 deletion delivery_carrier_label_postlogistics/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
##############################################################################
{'name': 'PostLogistics Labels WebService',
'version': '1.1',
'version': '7.0.1.1.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'maintainer': 'Camptocamp',
'category': 'version',
Expand Down
4 changes: 2 additions & 2 deletions delivery_carrier_label_postlogistics/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def _get_allowed_option_ids(self, cr, uid, ids, field_names, arg,
selected_single_options = [
opt.tmpl_option_id.postlogistics_type
for opt in carrier.available_option_ids
if opt.postlogistics_type in single_option_types
and opt.mandatory]
if opt.postlogistics_type in single_option_types and
opt.mandatory]
if selected_single_options != single_option_types:
service_ids = option_template_obj.search(
cr, uid,
Expand Down
2 changes: 1 addition & 1 deletion delivery_optional_invoice_line/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
##############################################################################
{
'name': "Delivery Optional Invoice Line",
'version': '0.1',
'version': '7.0.0.1.0',
'category': 'Sales Management',
'description': """
This module allows to remove the default shipping line from the invoices
Expand Down
4 changes: 2 additions & 2 deletions delivery_optional_invoice_line/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _prepare_shipping_invoice_line(
res = super(stock_picking, self)._prepare_shipping_invoice_line(
cr, uid, picking, invoice, context=context)
if (
picking.carrier_id
and picking.carrier_id.do_not_create_invoice_line
picking.carrier_id and
picking.carrier_id.do_not_create_invoice_line
):
res = None
return res
4 changes: 4 additions & 0 deletions oca_dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
partner-contact
server-tools
stock-logistics-workflow
webkit-tools

0 comments on commit 02c2e75

Please sign in to comment.