diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 95b54b6baed..590718b48f0 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -314,9 +314,13 @@ class pos_session(osv.osv): # define some cash journal if no payment method exists if not pos_config.journal_ids: - cashids = self.pool.get('account.journal').search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context) + journal_proxy = self.pool.get('account.journal') + cashids = journal_proxy.search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context) if not cashids: - cashids = self.pool.get('account.journal').search(cr, uid, [('journal_user','=',True)], context=context) + cashids = journal_proxy.search(cr, uid, [('type', '=', 'cash')], context=context) + if not cashids: + cashids = journal_proxy.search(cr, uid, [('journal_user','=',True)], context=context) + jobj.write(cr, uid, [pos_config.id], {'journal_ids': [(6,0, cashids)]}) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index bc2ad8ab160..9c92145ed89 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -896,8 +896,8 @@ - - + @@ -906,7 +906,8 @@ - + @@ -916,7 +917,7 @@ -
+
@@ -933,7 +934,7 @@
- +