[FIX] account: do not validate move when novalidate is in context
The key 'novalidate' is added in the context when an operation not impacting the validation of a move is made. The validation recreates analytic lines which decrease the performances. In case of registrating a payment, the skipped validation are the one from the reconcile method (reconciliation does not change the validity) Fixes #3787, opw 618529
This commit is contained in:
parent
eaef500e9d
commit
c68ecbe093
|
@ -1197,7 +1197,7 @@ class account_move_line(osv.osv):
|
||||||
if journal.centralisation:
|
if journal.centralisation:
|
||||||
self._check_moves(cr, uid, context=ctx)
|
self._check_moves(cr, uid, context=ctx)
|
||||||
result = super(account_move_line, self).write(cr, uid, ids, vals, context)
|
result = super(account_move_line, self).write(cr, uid, ids, vals, context)
|
||||||
if check:
|
if check and not context.get('novalidate'):
|
||||||
done = []
|
done = []
|
||||||
for line in self.browse(cr, uid, ids):
|
for line in self.browse(cr, uid, ids):
|
||||||
if line.move_id.id not in done:
|
if line.move_id.id not in done:
|
||||||
|
|
Loading…
Reference in New Issue