Reports and PDF for printing and email (revisited)

New user of Tryton here. We are in Canada, and are evaluating Tryton for a small manufacturing business running multiple machines across three 8-hour shifts. The Production module looks very much like what happens on the factory floor, which is great. But I am struggling with a few items.

I have put up a docker image (although not yet one with the ‘-office’ suffix, which I know is required for PDF and so I will do shortly), with Universal Chart of Accounts. I have been trying to get reports working, but in most modules the ‘Print’ icon is disabled. The few areas where it is enabled, I don’t see meaningful output. Even on the Tryton demo site (demo7.4.tryton.org).

I would be grateful for some guidance on how to get my head around Reports:

  • Why are so few reports accessible in the modules?
  • Are there more that need to be imported (or enabled)?
  • How to access the templates?
  • Is there a library of sample templates I would review, and use as a starting point to create something suitable for this company?
  • Is the primary paradigm to download the report and view it under LibreOffice, and then leave it to the user to decide whether to send it out? If there is, is there any way to get a preview prior to emailing.
    The current workflow here is that for Customer Invoices, Sales/Purchase Orders, Supplier Invoices should have an option to email as PDF directly upon generation (or subsequently).

I am happy to write up a user guide/tutorial to make it easier for other new users to grasp this functionality based on my own stumbling.

I have read:

ODT or PDF report as an attachment for the emailed reports

and

Print to PDF instead of ODT

advTHANKSance

The icon on the UI is disabled when no report is available for that record.

Why are so few reports accessible in the modules?

Here are some common reports, have you seen them?:

  • Sale
  • Purchase
  • Invoice
  • Shipment Picking List
  • Shipment Delivery Note
  • General Ledger
  • Trial Balance
  • Party Letter
  • Party Labels

Yes, you’ll find that most modules don’t have any report, but note that you can generate your custom csv export with the Export function.

Are there more that need to be imported (or enabled)?

No, you don’t need to import anything, if you have the module that have the report you should have the report also.

How to access the templates?

You can find in the source code all the reports in their corresponding module, for example you can find sale.fodt on sale module.

Is there a library of sample templates I would review, and use as a starting point to create something suitable for this company?

You can follow the tutorial section about creating reports:
https://docs.tryton.org/latest/server/tutorial/module/report.html

Is the primary paradigm to download the report and view it under LibreOffice, and then leave it to the user to decide whether to send it out? If there is, is there any way to get a preview prior to emailing.

Sorry did not understand this.

The current workflow here is that for Customer Invoices, Sales/Purchase Orders, Supplier Invoices should have an option to email as PDF directly upon generation (or subsequently).

You have two options, Email Templates and Triggers, Email Templates allow you to select which email template you want to send and what are the attachments, you will preview the email text, not the report content, and you just need to send. You also have Triggers, you can configure them to be executed when a condition is accomplished, for things like, send an email with the delivery note when the shipment is done, in Triggers you don’t have control on the previews because they are meant for automation.

Mainly because there are very few use case where printing is needed.

You can find them in the Report Action.
From there you can re-upload your own customized version.

We provide only one template for each report. They are in OpenDocument format so they can be easily edited with LibreOffice as WYSWYG.

It is up to the user to decide either to send himself with his email account or to use the “Email” tool of the client (which request the server to send an email).

The “Email” mini-client does not provide preview. If the user wants to see it before sending, he has to download using the “Print” toolbar button.

This is probably best managed with the Notification Email Module which allows you to setup automatic email when some changes (like state going to quotation) happen. But even if theoretically this can be setup from the client, it may require some technical knowledge to setup correctly. There is a proposal to add trigger templates.

Thank you.

This helps me get some traction on reporting. I’ll do my best to create a tutorial with the pointers given above.

Regards.

PS: I will, in parallel, come up with a list of reports used currently and map them back. The missing link for me was to find the templates under Administration > User Interface > Actions > Reports. I’ll poke around to understand Actions more thoroughly.

Is the primary paradigm to download the report and view it under LibreOffice, and then leave it to the user to decide whether to send it out? If there is, is there any way to get a preview prior to emailing.

Sorry did not understand this.

I was missing the step of reports being downloaded as .odt onto the desktop for the user to save+review. I was trying to see if PDF could be the primary output, and if it could be made to be previewed — in a new browser tab, for example.

Hello from Canada also! :slight_smile: My personal interest is also manufacturing, but perhaps more from perspective of engineering design, supply chain documentation and PLM.

Not for me. I generate PDF files for users to download. To do this required installing LibreOffice on my server to do the conversion from ODT to PDF. For more information, see my posts and community replies:

1 Like

P.S. I was also surprised by not having more report templates, for example there does not seem to be a BOM template. Perhaps we could collaborate to create a library of standard reports.

1 Like

Yes, definitely, I’m happy to work together. The reports related to products, and production were on my mind. It is great to have the Production module, but the client’s factory floor runs on paper, and so it would be good to be able to generate reports related to production.

Also, I noticed that while source templates are related to OpenOffice, i.e., ‘Template Extension’, output formats include LaTeX 2e under the ‘Extension’ drop down. Is this also related to the OpenOffice engine being used? Creating LaTeX templates at our end would be great as I am conversant in TeX.

I also need to have the templates handle in-house typesetting standards, and so things like using IBM Plex as the base font family is requirement.

No the “Template Extension” which is the source format supported does not include LaTex.
But LibreOffice is able to convert generated text document to LaTex as output format (the “Extention” definition).

1 Like

Thank you, Cédric.

If we wanted to use our own typesetting engine and scripts, what would be the best way to get the information out of the models akin to how .fodt files receive it? Is there an existing pipe that we could leverage? There was mention of CSV, but since we would need things like client information, tax blurbs, payment terms (for invoices), etc., is there a key-value pair output option like JSON?

You can develop your own report engine by extending the Report class.