Odoo Help


creating record does not work wich create() Metohdo or raw SQL

on 10/24/16, 9:21 AM 468 views

we try to save all generated pdf Reports by deriving from report Class and overwriting get_pdf:

class ReportDerived(models.Model):
_inherit = 'report'
def get_pdf(self, cr, uid, ids, report_name, html=None, data=None, context=None):
return super(ReportDerived, self).get_pdf(cr, uid, ids, report_name, html, data, context)

Model for storing:

class x_report_storage(models.TransientModel):
_name = "x_report.storage"
_description = "Storage of Reports"
model = fields.Text(string='Model:', required=False)
ids = fields.Text(string='IDs:', required=False)
filename = fields.Text(string='Filename:', required=False)

now we tried within the get_pdf Method different ways to store the data:

vals = {'model': 'test',            
'filename': 'testfname',
'ids': 'testIDS',}


ql = ('insert into x_report_storage(ids) values("aaa")')        

But both versions do not work.

We do not get any odoo-log entries. Odoo stops at this lines without any special response.

Please give some hints whats wrong.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/24/16, 9:21 AM
Seen: 468 times
Last updated: 10/24/16, 9:25 AM