Skip to content

Commit

Permalink
[FIX] glitches introduced during last forward-port (as always)
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Sep 22, 2015
1 parent 3fd91d4 commit 71d03fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions addons/account/wizard/pos_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def _run(self, cr, uid, ids, records, context=None):
for record in records:
if not record.journal_id:
raise UserError(_("Please check that the field 'Journal' is set on the Bank Statement"))

if not record.journal_id.internal_account_id:
raise UserError(_("Please check that the field 'Internal Transfers Account' is set on the payment method '%s'.") % (record.journal_id.name,))

Expand All @@ -40,8 +39,7 @@ def _run(self, cr, uid, ids, records, context=None):

def _create_bank_statement_line(self, cr, uid, box, record, context=None):
if record.state == 'confirm':
raise osv.except_osv(_('Error!'),
_("You cannot put/take money in/out for a bank statement which is closed."))
raise UserError(_("You cannot put/take money in/out for a bank statement which is closed."))
values = self._compute_values_for_statement_line(cr, uid, box, record, context=context)
return self.pool.get('account.bank.statement').write(cr, uid, [record.id], {'line_ids': [(0, False, values)]}, context=context)

Expand Down
2 changes: 1 addition & 1 deletion openerp/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def setUp(self):
@self.addCleanup
def reset():
# rollback and close the cursor, and reset the environments
self.registry.clear_caches()
self.registry.clear_caches()
self.env.reset()
self.cr.rollback()
self.cr.close()
Expand Down

0 comments on commit 71d03fa

Please sign in to comment.