PEP8 + add xlrd

This commit is contained in:
Matthieu Dietrich
2016-04-28 11:40:14 +02:00
parent 6d2adbca2f
commit 106d8d50d3
4 changed files with 6 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ install:
- 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 xlrd
script:
- travis_run_tests

View File

@@ -132,7 +132,9 @@ class AccountJournal(models.Model):
'account_id': commission_account_id,
'already_completed': True,
}
move_line_obj.with_context(check_move_validity=False).create(comm_values)
move_line_obj.with_context(
check_move_validity=False
).create(comm_values)
# Counterpart line
if total_amount > 0.0:
receivable_account_id = self.receivable_account_id.id or False

View File

@@ -319,10 +319,6 @@ class AccountMoveLine(models.Model):
def _update_line(self, vals):
""" Do raw update into database because ORM is awfully slow
when cheking security.
TODO / WARM: sparse fields are skipped by the method. IOW, if your
completion rule update an sparse field, the updated value will never
be stored in the database. It would be safer to call the update method
from the ORM for records updating this kind of fields.
"""
cols = self._get_available_columns([vals])
vals = self._prepare_insert(vals, cols)

View File

@@ -48,10 +48,10 @@ NAMES_COMPLETION_CASES = [
]
class base_completion(common.TransactionCase):
class BaseCompletion(common.TransactionCase):
def setUp(self):
super(base_completion, self).setUp()
super(BaseCompletion, self).setUp()
tools.convert_file(self.cr, 'account',
get_module_resource('account', 'test',
'account_minimal_test.xml'),