I'm currently developing a button that can print a label for order line, and I'm using the function print_quotation that I've rename print_label for consistency. But I'm confronted by an error that's tell this:
File "/home/odoo/src/user/hubi/models/inherited_sale_order.py", line 117, in print_label return self.env.ref('hubi.action_hubi_packing_preparation').report_action(self) AttributeError: 'ir.actions.act_window' object has no attribute 'report_action'
I've tried another solution for the line:
return self.env.ref('hubi.action_hubi_packing_preparation').report_action(self)
That is:
return {'type': 'ir.actions.report','report_name': 'report_saleorder_hubi_document','report_type':"qweb-pdf"}
But for this line I've got an error that display a KeyError : False