Plugin: Beluga Serverprint

From iDempiere en

creating printable documents and distribute or print them

Logo Martin Schönbeck Beratungen GmbH
  • Creator: Martin Schönbeck Beratungen GmbH, Germany.
  • Current Version: 5.1.2
  • License: GPLv2
  • Source: GitHub
  • Release: Release
  • CUPS implementation: CUPS
  • Video showing configuration (a bit outdated): server print plugin
  • tested with: 10. It is unlikely to work with older versions.


Description

  • The plugin Beluga Serverprint evolved as a result of the requirement to print shipments and invoices directly from server once on the letterhead and once on blank paper. As usual some requirements where added and some ideas came across.
  • Now it's able to create jasper reports with print profiles which depend on the organization, the business partner, the active user, the calling tab and of course the document type. These reports than can be printed in several ways, archived, sent by mail or stored in a directory on the server, for example to pass it over to a DMS
  • The plugin is built without changing the default processes of iDempiere, so it can be installed without side effects on the ongoing operation. Visible is only an additional toolbar button beneath the normal print button. This button starts the server printing. Without pressing this button iDempiere behaves as before.

Installation

  • Simply install it via Felix-Console. You are done.
  • German translation is included.
  • If you want to print, you will need an implementation of your printing service like this CUPS implementation as well.

This is how to configure it:

creating a copy type

  • You first have to create some 'copy type', for example "for the customer" or "for the company", which represent the purpose of the result. These entries define the copies potentially created. When starting the printing, serverprint will try to find a valid configuration for each of these copy types. If not found, this copy won't be produced.

Screenshot Copy Type

configure a printer

  • If you want to print, you will then have to define the printers. Add a printer provider - the field "Protocol" is used to choose the service implementation. Then run the "Lookup Printers" process using the gear in the toolbar.

Screenshot Printer Provider

  • Using the "Zoom Across" feature you can take a look at your new printers. In there you can start the process "Lookup Printer Attributes" to gather attributes and their respective values the printer allows for in jobs.

Screenshot printer

  • If you selected to read the attributes automatically like this, they will appear in the tab Printer Attributes and their values in the tab Printer Attribute Values. You may choose to change the Name of both, e.g. if you can't remember what pf-700-a means. You should normally not change the value of Printer Attribute Name, as it won't work then. But of course you may enter attributes and attribute values manually if you know, your printer knows them but doesn't deliver them to be automatically inserted.

Screenshot Printer attributes Screenshot Printer attributes value

  • After having created the attributes you can combine them to define configurations for your print jobs.

Screenshot printer configuration Screenshot Printer configuration attributes

  • now you were able to print on a given printer in a defined fashion. But because different user may want to do the printing on different printers we need an additional step.

create a print configuration

  • In the print configuration we define a way to print a required result (e.g. printing on letterhead) for different users. You can define one entry for each print configuration as default so that all users without a special assignment print on that printer.

Screenshot print configuration Screenshot print configuration entry

the print profile

  • All this is then connected in the print profile. The profile is connected to the organization (or all of them), has a priority and can be labeled as standard.

Screenshot print profile


  • The next level called 'sub print profile' is defined by the tab, the document type or both.

Screenshot sub print profile


  • It collects the 'copies' where the jasper report and the copy type is defined. The jasper report can be called with an additional parameter to for example create with the same report a result once with and once without logo. The parameter is called 'ReportVariant'. You can select output formats other than pdf (default) if e.g. you want to send an order as csv-file via mail to an automatic ordering portal.
  • This jasper report together with it's parameter is called only once independently of the number of occurences in different entries. Further more this tab defines what to do with the result of the jasper report.
  • The check mark named 'to archive' is speaking for itself.
  • The scope 'Printing' defines which print configuration defined before is to be used and how much copies have to be printed. If either no print configuration is given or the number of copies is 0 nothing is printed.
  • The scope E-Mail allows to sent the document as pdf via email to user given in the document (ad_user_id), additional as CC: oder exclusively as To: to a given email address. To do this an email template can be selected, if not the content and subject of the mail is empty. Setting the check mark 'senddirectly' will cause the mail to be sent immediately, else it can be edited before sending. The mail configuration of the actual user will be used for From: if marked, otherwise the information configured in the client setup will be used. Beside the document you can add additional attachments by putting them into the attachments of the document. Only attachments whose name start with one of the prefixes given in the field here are attached.
  • And at least you can deposit the resulting document in a directory on the server, where it perhaps can be processed by a DMS or printed by a job from elsewhere.

Screenshot copies


the printoption

  • If you want to group a set of copies together, you can optionally use printoptions. A printoption allows the user at runtime to decide which option - and thereby which set of copies - to use.

Screenshot Print option

  • If two or more printoptions (that are not marked "process calls only") are specified for a set of copies and UI is available, a dialog will open.

Screenshot Select option

The process then is as follows:

  • Hit the button right to the normal printing button.
  • For each Copy Type which is defined exactly one sub print profile will be looked up. Any one Copy Type may stem from a different sub print profile. Looking up the sub print profile is done by searching all print profiles, which match the organization (or all) and either are marked as standard or directly connected with the business partner. The profiles are sorted by priority first, than those not marked as standard, than those with exact matching organization. The sub print profile will be ordered first those where tab and document type match, than those without tab and matching the document type and than those without document type and matching tab.
  • Only the first resulting sub print profile for each Copy Type will be used. All entries of those sub print profiles for the selected Copy Type will than be executed.
  • A typical usage for example would be a standard profile for invoices with one printout "for the customer" and one "for the company". Customer which have to receive the invoice by mail will be connected to a profile containing only an entry for the Copy Type "for the customer" witch then produces the mail (and voids the corresponding entry in the standard profile). If you want to remove a Copy Type which is defined in the standard profile simply create a profile which has an empty copy entry for this Copy Type.

Using it in workflows:

  • you can now use it in workflows, the process has the previously internally used parameters as process parameters defined. The parameter AD_Table_ID is currently only used to archive the document and should be set to the ID of the table. The AD_Tab_ID is used to identify the required print configuration where it is not defined by the document type. Set it to the correct ID. When setting the user remember, that @#AD_User_ID@ is case sensitive. The Record_ID is the record ID of the workflow, since 8.2 it can be overwritten by entering a parameter which is not connected to a process parameter and has the Attribute Name 'Record_ID'.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.