Odoo Help

0

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

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

plz give some answers...

3

Axel Mendoza

--Axel Mendoza--
11108
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

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: 1537 times
Last updated: 12/27/15, 10:47 PM