[fix] when the last line in draft of the statement is confirmed, the statement should be confirmed only after passing the usual balance check, if the check is enabled in the profile. I add a test that shows the bug

This commit is contained in:
Leonardo Pistone
2014-03-07 14:59:48 +01:00
parent 384c7a673c
commit eaa1e8605f
3 changed files with 49 additions and 0 deletions

View File

@@ -95,4 +95,10 @@ class Statement(orm.Model):
'state': 'confirm'
}, context=context)
need_to_update_view = True
self.balance_check(
cr,
uid,
statement.id,
journal_type=statement.journal_id.type,
context=context)
return need_to_update_view