Technical tools ·

Interface designer: Python windows inside the ERP

Drawing a window and writing only what each button does is the fastest way to build a desktop app. The Interface designer, inside the Code app, works that way: drag components onto a form, adjust their properties, and the ERP generates a Python desktop app with tkinter. To be clear early on: each app opens in its own system window, not inside the ERP, and needs Python with tkinter on the computer.

ERPSqlite screenshot: Code editor with file explorer and syntax highlighting
Code editor with file explorer and syntax highlighting

How you work

  • Component palette, grid form, drag, resize, align, copy and undo.
  • Object inspector with properties and events: a double click takes you to the button's code.
  • F9 runs and F12 switches between form and code.
  • Five examples: calculator, to-do list, converter, contacts and ERP products.
  • Each app can have its own home icon.
ERPSqlite screenshot: Source control: diff of a modified file
Source control: diff of a modified file

ERP data and other databases

Windows read and write ERP data through its API, with the permissions of whoever opens them, and a temporary access that is never written in the code. They also connect to SQLite, PostgreSQL and MySQL with a linked data table. The ERP API must be on to use its data, and PostgreSQL and MySQL need a Python package the app will tell you about.

ERPSqlite screenshot: Database manager: tables, columns and a SQL query
Database manager: tables, columns and a SQL query
ERPSqlite screenshot: API client: saved request with its JSON response
API client: saved request with its JSON response

With AI help

You can ask for a whole window, a change or a button's code. You see the proposal before applying it, with a single undo, and the code goes through the same approval as any other.

ERPSqlite screenshot: Database diagram with its tables and relationships
Database diagram with its tables and relationships
ERPSqlite screenshot: Flowchart of order creation in the web store
Flowchart of order creation in the web store

From window to web, with the same code

When you create an app in the Interface designer you now choose the target: Desktop or Web. You use the same palette, the same form and the same Python, because each event runs on a Flask server on your computer and the page only shows the result. ERP data and connections to other databases work the same way, and access never reaches the browser. Each run has its own secret, listens only on this computer and ends when you stop it or close the ERP. You can export the file to install elsewhere, although it will have no ERP data there. Anything with no page equivalent, such as drawing on the canvas, is flagged by the designer.

ERPSqlite screenshot: Searching across all project files
Searching across all project files
ERPSqlite screenshot: Git history: a commit with its changes
Git history: a commit with its changes

Messages, names and deployment without surprises

A messagebox in a web app shows its text on the page, like self.notify(), and a question is answered no, because a page has no dialogs. The page's messages show in Spanish or English depending on the browser. Exported, it uses port 8000 unless told otherwise, and if you serve it with several gunicorn processes it tells you to start it with one. Renaming a table moves the code that reads its rows to the new name.

ERPSqlite screenshot: Code → Editor
Code → Editor
ERPSqlite screenshot: Code → API
Code → API

What it does not do

  • It publishes nothing to the internet: web apps run on this computer only.
  • It does not embed the window in the ERP: it opens separately, from its icon.
  • It is for administrators only.
  • It runs with your system user's permissions and asks for approval whenever the code changes.
  • It was tested on macOS: Windows and Linux are untested.
ERPSqlite screenshot: Code → Diagrams
Code → Diagrams
ERPSqlite screenshot: Code → Diagrams: the “New” form
Code → Diagrams: the “New” form

Frequently asked questions

Which Python do I need?

One with tkinter. The app detects it and tells you what is missing.

Can it delete ERP data?

Not through its API access: that allows search, read, create and update, with your permissions, but not delete. The code itself is another matter: it runs as your system user and can touch your files, which is why it asks for approval.

Try Code in ERPSqlite

90-day trial with every app included, on Windows, macOS or in your browser.

Keep reading

← All blog guides