Example of export and print button and key shortcut

I am trying to make a print button and a export button for a module, is there any example of how to do that? And also I would like to know if tryton handles key shortcuts and if there any example.

Thanks in advance!

For printing, Tryton is using the reports. You can find documentation on Reports — trytond 5.5 documentation
Reports can also be used as export if you use for example a flat text template.

1 Like

To add an action on a button, you have to use @Modelview.button_action decorator.
Example: modules/purchase_request: 4b91ec43b4d3 purchase_request.py
And your action should apply on report… for instance:

def print(cls, purchases):
1 Like