Print from custom button

17 views
Skip to first unread message

Josias Pérez

unread,
Jun 26, 2018, 4:35:06 PM6/26/18
to tryton-dev
Hi,

I have a custom module with transitions controlled by buttons. In the last transition I need that the active record is printed. I have already created a report and it appear in the actions menu, but I want to print it with the button.

Thanks in advance!

Cédric Krier

unread,
Jun 27, 2018, 2:45:06 AM6/27/18
to tryton-dev
Hi,

On 2018-06-26 10:42, Josias Pérez wrote:
> I have a custom module with transitions controlled by buttons. In the last transition I need that the active record is printed. I have already created a report and it appear in the actions menu, but I want to print it with the button.

You must use the decorator button_action:
http://doc.tryton.org/4.8/trytond/doc/ref/models/models.html#trytond.model.ModelView.button_action
This will make the client launch the referenced action.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages