mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
add a TODO in _update_lines to mention the potential pitfall with serializable fields
This commit is contained in:
@@ -284,7 +284,12 @@ class AccountStatementLine(Model):
|
||||
|
||||
def _update_line(self, cr, uid, vals, context=None):
|
||||
""" Do raw update into database because ORM is awfully slow
|
||||
when cheking security."""
|
||||
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])
|
||||
tmp_vals = (', '.join(['%s = %%(%s)s' % (i, i) for i in cols]))
|
||||
sql = "UPDATE account_bank_statement_line SET %s where id = %%(id)s;" % tmp_vals
|
||||
|
||||
Reference in New Issue
Block a user