[FIX] pos test: a selection field is stored as a string but used as an int.

bzr revid: vmt@openerp.com-20110727152315-kl2mi6dglmbdztq8
This commit is contained in:
Vo Minh Thu 2011-07-27 17:23:15 +02:00
parent b1b97ba9db
commit 68244bf404
2 changed files with 7 additions and 2 deletions

View File

@ -553,7 +553,7 @@ class pos_order(osv.osv):
args['ref'] = order.contract_number or None
statement_id = statement_obj.search(cr,uid, [
('journal_id', '=', data['journal']),
('journal_id', '=', int(data['journal'])),
('company_id', '=', curr_company),
('user_id', '=', uid),
('state', '=', 'open')], context=context)
@ -563,7 +563,7 @@ class pos_order(osv.osv):
statement_id = statement_id[0]
args['statement_id'] = statement_id
args['pos_statement_id'] = order_id
args['journal_id'] = data['journal']
args['journal_id'] = int(data['journal'])
args['type'] = 'customer'
args['ref'] = order.name
statement_line_obj.create(cr, uid, args, context=context)

View File

@ -52,6 +52,11 @@
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data)
-
Create a record for the root user in pos.payment.report.user (used by the next python block).
-
!record {model: pos.payment.report.user, id: pos_payment_report_user_1}:
user_id: []
-
Print the POS Payment Report through the wizard
-