From c68ecbe0931128a09a4cea86a4ec5897793864e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 21 Nov 2014 00:38:39 +0100 Subject: [PATCH] [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 --- addons/account/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 8ac78212d0a..0613e5fa197 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1197,7 +1197,7 @@ class account_move_line(osv.osv): if journal.centralisation: self._check_moves(cr, uid, context=ctx) result = super(account_move_line, self).write(cr, uid, ids, vals, context) - if check: + if check and not context.get('novalidate'): done = [] for line in self.browse(cr, uid, ids): if line.move_id.id not in done: