Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2.ProgrammingError: can't adapt type 'event.model' #1418

Open
heniq opened this issue Jul 27, 2018 · 0 comments
Open

psycopg2.ProgrammingError: can't adapt type 'event.model' #1418

heniq opened this issue Jul 27, 2018 · 0 comments

Comments

@heniq
Copy link

heniq commented Jul 27, 2018

Error to render compiling AST
ProgrammingError: can't adapt type 'event.model'
Template: event_management.report_event_booking_template_document
Path: /templates/t/div[2]/div/div[2]/div/table[1]/thead/tr/th[2]/span
Node:

i cant pass data in render_qweb_pdf(self,data=data),here is my code

report_name = 'event_management.report_event_booking_template'
report_data = {'form': self.read()[0],
'ids': self.id,
'model': 'event.model'}
xml_id = self.env['ir.actions.report'].search([('report_name','=',report_name)])
pdf_data = xml_id.render_qweb_pdf(self,data=report_data)
)
data = base64.encodestring(pdf_data[0])
pdfvals = {'name': ("%s.pdf" % self.event_number),
'res_id': self.id,
'datas': data,
'datas_fname': ("%s.pdf" % self.event_number),
'type': 'binary',
}
pdf_create = self.env['ir.attachment'].create(pdfvals)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant