Odoo Help

0

how to create a xml Qweb report on button click??

By
Deepak Krishna
on 12/22/15, 12:50 PM 1,933 views

plz give some answers...

3
Axel Mendoza
On 12/22/15, 2:41 PM

I guess that what you wanna do is use a button to trigger the report download. If that is your case you could do it like:

def get_label(self, cr, uid, ids, context=None):

    if ids:

       if not isinstance(ids, list):

           ids = [ids]

       context = dict(context or {}, active_ids=ids, active_model=self._name)

   return {

      'type': 'ir.actions.report.xml',

      'report_name': 'mrp.product_label_document',

      'context': context,

   }

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.

Register

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)

Stats

Asked: 12/22/15, 12:50 PM
Seen: 1933 times
Last updated: 12/27/15, 10:47 PM