Meera Trambadia (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-account-cash-statement-mtr into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-cash-statement-mtr/+merge/78051

Account:checked _sub_total and button_cancel methods of cash register in yml as 
per the coverage of account_cash_statement.py 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-cash-statement-mtr/+merge/78051
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-account-cash-statement-mtr.
=== modified file 'account/test/account_cash_statement.yml'
--- account/test/account_cash_statement.yml	2011-01-14 00:11:01 +0000
+++ account/test/account_cash_statement.yml	2011-10-04 07:06:00 +0000
@@ -35,6 +35,17 @@
     - state == 'open'
 
 -
+  I check the subtotal of the Opening balance
+-
+  !python {model: account.cashbox.line}: |
+    open_bal = {}
+    ids = self.search(cr, uid, [('starting_id', '=', ref('account_bank_statement_1'))])
+    res = self._sub_total(cr, uid, ids, 'subtotal', None, {'lang': u'en_US', 'tz': False})
+    for k, v in res.items():
+      if v != 0.0:
+        open_bal[k] = v
+    assert open_bal, ('Opening balance is not correct')
+-
   I enter values in Closing balance before close the cashbox
 -
   !record {model: account.bank.statement, id: account_bank_statement_1}:
@@ -80,3 +91,12 @@
     assert bank_data.move_line_ids, "Move lines not created for bank statement"
     for line in bank_data.move_line_ids:
       assert line.move_id.state == 'posted', "Move state is not posted"
+-
+  Then I cancel Cash register and verifies that it raises a warning
+-
+  !python {model: account.bank.statement}: |
+    try:
+      self.button_cancel(cr, uid, [ref("account_bank_statement_1")], {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu',
+        'journal_type': 'cash', 'active_ids': [ref('journal_cash_move_lines')], 'active_id': ref('journal_cash_move_lines')})
+    except Exception, e:
+      assert e, "Warning message has not been raised"
\ No newline at end of file

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to