[FIX] point_sale : In point of sale, put money in operation is not working
authorBharat (OpenERP) <bde@tinyerp.com>
Fri, 14 Oct 2011 09:15:19 +0000 (14:45 +0530)
committerBharat (OpenERP) <bde@tinyerp.com>
Fri, 14 Oct 2011 09:15:19 +0000 (14:45 +0530)
lp bug: https://launchpad.net/bugs/871684 fixed

bzr revid: bde@tinyerp.com-20111014091519-3i2g7pwzy6j0yx3a

addons/point_of_sale/wizard/pos_box_entries.py

index 0b417d8..0c48aff 100644 (file)
@@ -96,11 +96,11 @@ class pos_box_entries(osv.osv_memory):
         for data in  self.read(cr, uid, ids, context=context):
             vals = {}
             curr_company = res_obj.browse(cr, uid, uid, context=context).company_id.id
-            statement_id = statement_obj.search(cr, uid, [('journal_id', '=', data['journal_id']), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
+            statement_id = statement_obj.search(cr, uid, [('journal_id', '=', int(data['journal_id'])), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
             if not statement_id:
                 raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
 
-            acc_id = product_obj.browse(cr, uid, data['product_id']).property_account_income
+            acc_id = product_obj.browse(cr, uid, int(data['product_id'])).property_account_income
             if not acc_id:
                 raise osv.except_osv(_('Error !'), _('Please check that income account is set to %s')%(product_obj.browse(cr, uid, data['product_id']).name))
             if statement_id: