Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Solved-QWebException: "coercing to Unicode: need string or buffer, int found" while evaluating

By
Mostafa Mohamed Abdelmonam Abdo
on 4/4/15, 8:53 PM 898 views

I have a problem in my code  :


where week_day ,name are chars and exam_date is date but sasa_zozo and teacher_ids are intgers

when i try to print a report it gives me error



def exam_day_date (self,day_id_date):

id_date= []

self._cr.execute(

"""select week_day,exam_date ,s.name,t.sasa_zozo,y.teacher_ids from fci_exam_time_table_line, fci_subject s ,rel_sa t,lgna_teacher y where exam_id = %d group by week_day,exam_date ,s.name,t.sasa_zozo,y.teacher_ids order by exam_date """ % (

day_id_date))

res = self._cr.dictfetchall()

self._cr.execute(

"""select week_day,exam_date ,s.name,t.sasa_zozo,y.teacher_ids from fci_exam_time_table_line, fci_subject s ,rel_sa t,lgna_teacher y where exam_id = %d group by week_day,exam_date ,s.name,t.sasa_zozo,y.teacher_ids order by exam_date """ % (

day_id_date))

time_data = self._cr.dictfetchall()

for time_detail in time_data:

for data in res:

time_detail[data['week_day']] = '('+data['week_day']+')\n'+data['exam_date']+'\n('+data['name']+')'+data['sasa_zozo']+data['teacher_ids']

id_date.append(time_detail)

print (id_date)

return id_date



1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 4/5/15, 5:25 PM

Hi,

change %d by %s

bye

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/4/15, 8:53 PM
Seen: 898 times
Last updated: 4/5/15, 5:25 PM