diff --git a/addons/account_test/account_test_data.xml b/addons/account_test/account_test_data.xml index 415664b9653..2a23c1196f9 100644 --- a/addons/account_test/account_test_data.xml +++ b/addons/account_test/account_test_data.xml @@ -22,8 +22,7 @@ if res[0]['balance']!=0.0 and res[0]['balance'] is not None: 2 Test 2: Opening a fiscal year - - Check if the balance of the new opened fiscal year matches with last year's balance + Displays the debit and credit amount, of closed and newly created fiscal year, if the balance of current and newly created fiscal year mismatch - - Test 1 - Test 1 + 11 + Test 11: Consistency check between Account Move and Account Move Line + Checks id of 'account_move' = move_id of 'account_move_line', and state of 'account_move_line' is valid, and having sum(debit-credit) != 0 -
+You can write a query in order to create Consistency Test and you will get the result of the test 
+in PDF format which can be accessed by Menu Reporting -> Accounting Tests, then select the test 
+and print the report from Print button in header area.
+
+You can also use the following functions:
+
+get_parent(acc_id) : return parent id of analytic account(acc_id)
+reconciled_inv() : returns ids of records which are reconciled
+    
 Example: 
 sql = 'select id, name, ref, date from account_move_line where account_id in 
 (select id from account_account where type = 'view')'
diff --git a/addons/account_test/report/account_test_report.py b/addons/account_test/report/account_test_report.py
index 5c274773cd4..f8ba7a47f65 100644
--- a/addons/account_test/report/account_test_report.py
+++ b/addons/account_test/report/account_test_report.py
@@ -43,16 +43,6 @@ class report_assert_account(report_sxw.rml_parse):
         def group(lst, col):
             return dict((k, [v for v in itr]) for k, itr in groupby(sorted(lst, key=lambda x: x[col]), itemgetter(col)))
 
-        #TODO what is this method used for, name unclear and doesn't seem to be used
-        def sort_by_intified_num(a, b):
-            if a is None:
-                return -1
-            elif b is None:
-                return 1
-            else:
-                #if a is not None and b is not None:
-                return cmp(int(a), int(b))
-
         def reconciled_inv():
             reconciled_inv_ids = self.pool.get('account.invoice').search(self.cr, self.uid, [('reconciled','=',True)])
             return reconciled_inv_ids
@@ -86,12 +76,8 @@ class report_assert_account(report_sxw.rml_parse):
 
         if not isinstance(result, (tuple, list, set)):
             result = [result]
-
         if not result:
             result = [_('The test was passed successfully')]
-        #TODO: not sure this condition is needed, it is only a subcategory of the final else
-        elif all([isinstance(x, dict) for x in result]):
-            result = [', '.join(["%s: %s" % (k, v) for k, v in order_columns(rec, column_order)]) for rec in result]
         else:
             def _format(a):
                 if isinstance(a, dict):