diff options
| author | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-06-05 18:58:12 +0530 |
|---|---|---|
| committer | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-06-05 18:58:12 +0530 |
| commit | 37ac236cc5051b650ca2edc2a44322674d105ee2 (patch) | |
| tree | 4a14ba994893d1abc7807c0a539844f5256e0590 | |
| parent | 76bc2a11b26707d4bb87a43adf4b2d69b52b082a (diff) | |
[IMP]:point_of_sale
bzr revid: apa@tinyerp.com-20120605132812-mblxngyk7qi6si3d
| -rw-r--r-- | addons/point_of_sale/wizard/pos_box_entries.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index 3a4675a8296..943b6dba767 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -34,7 +34,7 @@ def get_journal(self, cr, uid, context=None): @param context: A standard dictionary @return :Return the list of journal """ - + journal_obj = self.pool.get('account.journal') statement_obj = self.pool.get('account.bank.statement') @@ -42,7 +42,7 @@ def get_journal(self, cr, uid, context=None): obj_ids = statement_obj.search(cr, uid, [('state', '=', 'open'), ('user_id', '=', uid), ('journal_id', 'in', j_ids)], context=context) res = statement_obj.read(cr, uid, obj_ids, ['journal_id'], context=context) res = [(r['journal_id']) for r in res] - if not len(res): + if not len(res) and context: raise osv.except_osv(_('Error !'), _('You do not have any open cash register. You must create a payment method or open a cash register.')) return res |
