[FIX] point_sale : In point of sale, put money in operation is not working

lp bug: https://launchpad.net/bugs/871684 fixed

bzr revid: bde@tinyerp.com-20111014091519-3i2g7pwzy6j0yx3a
This commit is contained in:
Bharat (OpenERP) 2011-10-14 14:45:19 +05:30
parent 55af4c6c9f
commit 5d53d94b42
1 changed files with 2 additions and 2 deletions

View 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: