Odoo Help


button gets greyed out after pressing

on 7/9/13, 11:37 AM 729 views

Hi, I have a print button using Aeroo reports as follows:

<button name="print_cube_crushing_certificate" string="Print" states="certified" type="object" icon="gtk-print"/>

the corrsponding function:

def print_cube_crushing_certificate(self, cr, uid, ids, context=None):
  records = self.browse(cr, uid, ids, context=context)
  if records[0].logbook_batch_id.state != 'verified':
     raise osv.except_osv('Error','Batch has not yet been verified')
     return True
  return {
          'type': 'ir.actions.report.xml',
          'report_name': 'CubeCrushing-single',    # the 'Service Name' from the report
          'datas' : {
                     'model' : 'logbook.logbook',    # Report Model
                     'res_ids' : ids

After pressing the button the pdf gets prepared and the button is greyed out and cannot be pressed again. Even moving to the the next record (in form view) the buttons stays greyed out and cannot be used. I have to go to tree view and than to form view again.

Anyone here who can help? Chris

P.S. I'm using V7 form and the button is in the header but I also tried without the new layout still the button gets inaccesable after the first press

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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: 7/9/13, 11:37 AM
Seen: 729 times
Last updated: 3/16/15, 8:10 AM