From 167938f9f5e1232ec54519382dc80e507ffd380e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 13 Nov 2008 10:48:40 +0100 Subject: [PATCH] Add check for already reconciled line --- move.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/move.py b/move.py index de15520479..3ca55a7975 100644 --- a/move.py +++ b/move.py @@ -476,6 +476,7 @@ class Line(OSV): 'no_journal': 'No journal defined!', 'move_view_inactive_account': 'You can not create move line\n' \ 'on view/inactive account!', + 'already_reconciled': 'Line "%s" (%d) already reconciled!', }) def default_date(self, cursor, user, context=None): @@ -1227,6 +1228,11 @@ class Line(OSV): period_obj = self.pool.get('account.period') date_obj = self.pool.get('ir.date') + for line in self.browse(cursor, user, ids, context=context): + if line.reconciliation: + self.raise_user_error(cursor, 'already_reconciled', + error_args=(line.name, line.id,), context=context) + ids = ids[:] if journal_id and account_id: if not date: