Browse Source

Merge pull request #336 from gurneyalex/8.0-fix-travis

fix 8.0 branch travis build
pull/349/head
Holger Brunn 9 years ago
parent
commit
03addf2f39
  1. 4
      .travis.yml
  2. 10
      base_external_dbsource/base_external_dbsource.py
  3. 6
      super_calendar/models/super_calendar_configurator.py

4
.travis.yml

@ -34,8 +34,8 @@ install:
- pip install python-ldap
- pip install unidecode
- pip install validate_email
- printf '[options]\n\nrunning_env = dev' > ${HOME}/.openerp_serverrc
- ln -s server_environment_files_sample ./server_environment_files
- printf '[options]\n\nrunning_env = dev\n' > ${HOME}/.openerp_serverrc
- ln -s ${TRAVIS_BUILD_DIR}/server_environment_files_sample ${TRAVIS_BUILD_DIR}/server_environment_files
script:
- travis_run_tests

10
base_external_dbsource/base_external_dbsource.py

@ -21,12 +21,17 @@
import os
import logging
import psycopg2
from openerp.osv import orm, fields
from openerp.tools.translate import _
import openerp.tools as tools
_logger = logging.getLogger(__name__)
CONNECTORS = [('postgresql', 'PostgreSQL')]
CONNECTORS = []
try:
import sqlalchemy
@ -62,9 +67,6 @@ except:
_logger.info('Oracle libraries not available. Please install "cx_Oracle"\
python package.')
import psycopg2
CONNECTORS.append(('postgresql', 'PostgreSQL'))
class base_external_dbsource(orm.Model):
_name = "base.external.dbsource"

6
super_calendar/models/super_calendar_configurator.py

@ -152,9 +152,9 @@ class SuperCalendarConfigurator(models.Model):
# Convert date_start to UTC timezone if it is a date field
# in order to be stored in UTC in the database
if line.date_start_field_id.ttype == 'date':
tz = timezone(self._context.get('tz')
or self.env.user.tz
or 'UTC')
tz = timezone(self._context.get('tz') or
self.env.user.tz or
'UTC')
local_date_start = tz.localize(date_start)
utc_date_start = local_date_start.astimezone(utc)
date_start = utc_date_start

Loading…
Cancel
Save