|
Hi,
I have got problem when I made a new wizard to print a report
I define my field, as you see below, it has only field project_id
_fields = { 'project_id':{'string':'Project_id','type':'many2one','relation':'project.project'}, }
I want users to choose project_id via wizard form, then I will print the report that satisfied the conditonal, so my code is:
def _get_data(self, cr, uid, data, context): sql ="""SELECT * FROM project_task t WHERE t.project_id='%s'"""%(data['form']['project_id']) cr.execute(sql) objects=cr.fetchall() return data['form']
The result is that it appears the form for me to choose project_id, but when I press Print button, report didn't show the id or (value) of the record that satisfied the project_id (it only shows ex: [[o.name]], [[o.project_id]])
I wonder whether I'm wrong with python code. Therefore, I really need your help. Does anyone give me suggestion to fix this problem.
If anyone can solve this problem, please help me.
I'll appreciate this and thanks anyway.
[/img][/url]
|