Extensions Overview

 

What are xTuple Extensions?

xTuple Extensions are a collective reference to custom scripts, screens, reports and other objects that may be added to the xTuple PostBooks core to enhance functionality without changing the core code or database schemas in any way.

xTuple ERP Embedded Design Tools

Several extension components can be created and modified directly from the xTuple ERP application.  You'll find these tools navigating the menu to System > Design:

  • Reports - xTuple ERP includes an embedded report writer application.  With this tool you can change visual presentation and the source query of standard reports or write your own from scratch.  Learn more...
  • Screens - xTuple ERP also includes an embedded version of Qt Designer.  From here you can import, export and create new screens from scratch using a graphical design tool. While you can not currently change core application screens with this tool, it is a great place to design your own custom displays, lists and maintenance screens.
  • Scripts - This is a lightweight text based code editor where you can write or paste in custom JavaScript code to modify the application. This is the way you can programatically modify both the appearance and behavior of core application windows and custom screens.  Learn more...
  • Custom Commands - You can create custom menu commands that launch external applications or custom screens.  These commands can even include custom privileges to control who may access them.  By default they fall into a "Custom" sub menu in a specified module, but with a little extra JavaScript they can be made to move and reappear anywhere in the menu structure. Learn more...
  • Packages - Packages are a way to bundle a group of extensions together into a single file that can be loaded and maintained all at once.  While, you can not edit package contents in the application, you can see the complete contents of packages that have been loaded and what their relationships are to other packages in the system.  Learn more...

xTuple External Tools

  • OpenRPT - This report writer utility embeded in xTuple ERP may be downloaded and run separately as well.  It also includes several other useful utilities including a renderer to print free standing reports and a utility to import report definition files in mass directly into a database.  Learn more...
  • MetaSQL - xTuple ERP supports the use of paramaterized queries which may be stored directly in the database.  These queries may be shared by core C++ code, JavaScript extensions and reports.  MetaSQL queries may be edited with any text editor or the MetaSQL Editor utility included with OpenRPT, which also allows testing of them on a live database.  When saved as files, MetaSQL files have an .mql extension.  OpenRPT also includes a MetaSQL import utility for mass importing of .mql files into the database.  Learn more...
  • Updater - xTuple uses a separate Updater utility to update xTuple ERP from one version to another, and to load and update extension packages.  Packages are compressed files that contain all the scripts involved in an update or extension bundle.  A configuration file package.xml defines what the contents are and how they are to be loaded into the database.  This file can direct the Updater to take the following actions:
    • Define the package version and schema
    • Load a SQL file designated as a new table, function, trigger or view
    • Create custom privileges
    • Create custom commands
    • Load application logic files including screens, scripts, reports, images and MetaSQL
    • Learn more...

Postgres Database Design Tools

xTuple relies exclusively on PostgresSQL as its database platform.  All business logic created by extensions is maintained in the database either as records or database objects.  Database design work such as the creation of new tables, functions, triggers and views can be accomplished using a variety of tools.  Psql is the defacto PostgreSQL command line tool while pgAdmin is the officially endorsed graphical interface.  All the objects necessary to extend xTuple can be created and edited from either of these tools.  However, there literally dozens of alternitive administration tools available as well.

xTuple does NOT recommend or endorse altering the core public or api schemas for local customizations.   All custom extensions should be created in their own schemas.  This ensures that extensions will not interfere with or be overwritten by upgrades to the xTuple core.  If you are interested in modifying the core please see the core development overview page.

The good news is if you intend on creating extension packages the Updater utility will automatically create a separate schema with the same name as your package, and several control tables to store all of your database application objects for you.  You can learn more about how this works in the packages topic.

Learn more

Click on the following links to learn more about interfacing with xTuple and building extensions: