mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
PEP 8
This commit is contained in:
@@ -459,7 +459,7 @@ class AccountStatementLine(orm.Model):
|
||||
"""
|
||||
statement_line_obj = self.pool['account.bank.statement.line']
|
||||
model_cols = statement_line_obj._columns
|
||||
sparse_fields = dict([(k , col) for k, col in model_cols.iteritems() if isinstance(col, fields.sparse) and col._type == 'char'])
|
||||
sparse_fields = dict([(k, col) for k, col in model_cols.iteritems() if isinstance(col, fields.sparse) and col._type == 'char'])
|
||||
values = []
|
||||
for statement in statement_store:
|
||||
to_json_k = set()
|
||||
@@ -470,11 +470,10 @@ class AccountStatementLine(orm.Model):
|
||||
serialized = st_copy.setdefault(col.serialization_field, {})
|
||||
serialized[k] = st_copy[k]
|
||||
for k in to_json_k:
|
||||
st_copy[k] = simplejson.dumps(st_copy[k])
|
||||
st_copy[k] = simplejson.dumps(st_copy[k])
|
||||
values.append(st_copy)
|
||||
return values
|
||||
|
||||
|
||||
def _insert_lines(self, cr, uid, statement_store, context=None):
|
||||
""" Do raw insert into database because ORM is awfully slow
|
||||
when doing batch write. It is a shame that batch function
|
||||
|
||||
Reference in New Issue
Block a user