Community mailing list archives
Re: AW: 404 when getting CSS for qweb reportby
Pedro M. Baeza
Yeah, that was what I was saying, but I haven't tried, so it seems to not work also. Sorry.Regards.
2016-05-06 9:42 GMT+02:00 Alexandre Fayolle <email@example.com>:
On 05/05/2016 16:22, Pedro Manuel Baeza Romero wrote: > Have you tried adding the key 'target' with the value 'current' to the > dictionary returned by get_action? Hi Pedro, Do you mean something like: @api.multi def confirm(self): self.ensure_one() to_print = self.holdback_payment_ids.mapped('holdback_payment_id') to_print.action_done() action = self.env['report'].get_action( self.purchase_id, 'outsourcing.holdback_payment_report_template', ) action['target'] = 'current' return action I had not tried, but the wizard stays open. Current workaround I'll have to sell to my end users is: @api.multi def confirm(self): self.ensure_one() to_print = self.holdback_payment_ids.mapped('holdback_payment_id') to_print.action_done() self.env['report'].get_pdf( self.purchase_id, 'outsourcing.holdback_payment_report_template' ) return False This closes the wizard and the report is available as attachment on self.purchase_id which is displayed when the wizard is closed... Not ideal... -- Alexandre Fayolle Chef de Projet Tel : +33 4 58 48 20 30 Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac Cedex http://www.camptocamp.com