Add a test suite

This commit is contained in:
Guewen Baconnier
2014-11-26 09:14:18 +01:00
parent 4ebb2cbc72
commit a87fdeb50a
3 changed files with 208 additions and 0 deletions

View File

@@ -113,6 +113,9 @@ class AccountStatementOperationRule(models.Model):
balance = statement_line.amount
for move_line in move_lines:
balance += move_line.credit - move_line.debit
# TODO use is_zero
if not balance:
return self.browse()
rules = self.search([])
# return the first applicable rule