diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py index 00a3c404a65..12a606833a1 100644 --- a/addons/account/wizard/pos_box.py +++ b/addons/account/wizard/pos_box.py @@ -28,6 +28,10 @@ class CashBox(osv.osv_memory): def _run(self, cr, uid, ids, records, context=None): for box in self.browse(cr, uid, ids, context=context): for record in records: + if not record.journal_id: + raise osv.except_osv(_('Error !'), + _("Please check that the field 'Journal' is set on the Bank Statement")) + if not record.journal_id.internal_account_id: raise osv.except_osv(_('Error !'), _("Please check that the field 'Internal Transfers Account' is set on the payment method '%s'.") % (record.journal_id.name,))