Odoo Help


how to call report action from method or inside method

ClueLogics Technologies Pvt. Ltd.
on 5/17/13, 8:00 AM 7,131 views

Hey all how can we call a report action from a method of that particular object.......

for now we can call a report action from a button ( type is action ) but i want from button but (type is object )

thats i want



Omal Bastin

--Omal Bastin--

| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 5/17/13, 8:14 AM

Your button function should return a dictionary with having type as 'ir.actions.report.xml' report_name as the name of the report and datas as the data of the current record. Following is an example

def check_report(self, cr, uid, ids, context=None):
        if context is None:
            context = {}
        data = self.read(cr, uid, ids)[0]
        datas = {
             'ids': context.get('active_ids',[]),
             'model': 'account.analytic.account',
             'form': data
        return {
            'type': 'ir.actions.report.xml',
            'report_name': 'account.analytic.account.balance',
            'datas': datas,

great answer....:):)

ClueLogics Technologies Pvt. Ltd.
on 5/17/13, 11:53 AM
On 4/27/15, 4:15 PM

I can't make it work on Odoo 8. 

I can write on a record, but I was unable to replicate with automated actions the button press to automatically create a pos order report. Could you gently help me Omal? 

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

0 follower(s)


Asked: 5/17/13, 8:00 AM
Seen: 7131 times
Last updated: 2/17/18, 9:45 AM