mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
PEP8 + add xlrd
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user