[FIX] unhandled multi selection of entries in wizard hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py

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

bzr revid: qdp@tinyerp.com-20090209114521-723c5n6yykyde79k
This commit is contained in:
qdp 2009-02-09 12:45:21 +01:00
parent 3105364249
commit d78d88cd72
1 changed files with 5 additions and 2 deletions

View File

@ -128,7 +128,10 @@ class invoice_create(wizard.interface):
#
# Compute for lines
#
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN (%s) AND product_id=%s and to_invoice=%s", (account.id, ','.join(map(str,data['ids'])), product_id, factor_id))
str_ids=""
for x in data['ids']:
str_ids += ','.join(str(x))
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN (%s) AND product_id=%s and to_invoice=%s", (account.id, str_ids, product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
for line in line_ids:
@ -195,7 +198,7 @@ class invoice_create(wizard.interface):
states = {
'init' : {
'actions' : [_get_accounts],
'result' : {'type':'form', 'arch':_create_form, 'fields':_create_fields, 'state': [('end','Cancel'),('create','Create invoices')]},
'result' : {'type':'form', 'arch':_create_form, 'fields':_create_fields, 'state': [('end','Cancel'),('create','Create Invoices')]},
},
'create' : {
'actions' : [],