HTKapp Logo

Documents Module (GED / ECM)

The HtkDoli Documents module lets you consult, add, and manage the files attached to your various Dolibarr entities (third parties, commercial proposals, orders, invoices, projects, etc.) directly from the application.

It works in two complementary ways:

  • a unified view accessible from the main menu, which gathers the documents of all your business objects into a single list;
  • a "Documents" section shown directly on an object's detail screen (invoice, product, etc.), to work in the context of that object.

Unified view (global list)

All your documents are gathered in a single list, accessible from the main menu. You don't need to navigate module by module to find a file.

Search, filter, and sort

  • Search field — Filter by file name or by the label of the parent object (e.g. "FA2025-0042", "Dupont SAS").
  • Filter by module — The filter button (funnel icon) shows the number of documents per module and lets you display only one of them.
  • Sort — Choose between Date (newest / oldest) or Name (A→Z / Z→A). Sorting by date groups documents by month and year; sorting by name creates alphabetical sections.
  • Refresh — A dedicated button re-runs the full scan of all modules. A progress bar shows the number of objects processed during loading.

Cards and sections

Each document is shown as a card displaying:

  • The file name (with an icon matching the type: PDF, image, spreadsheet, archive…)
  • The label of the parent object (invoice reference, third-party name, etc.)
  • A colored badge indicating the source module
  • The file size and date, when available

When scrolling through alphabetical or monthly sections, a central bubble shows the current letter or month.

Opening a document

Tap a card to open the document directly in the application. The built-in preview renders PDFs and images (JPEG/PNG photos, with zoom and panning). Files already viewed are cached locally for faster offline access.

Documents section on a detail screen

On the relevant screens, a "Documents" section (paperclip icon) lists the files attached to the current object and lets you act on them.

Consultation and preview

  • Document list: displays the documents associated with the business object (for example, an invoice or a product).
  • Built-in preview: opens a quick view of downloaded documents — renders PDFs and images (with zoom and panning for the latter). File types that cannot be previewed can be opened via the share button.

Adding a document

The Add a document button opens an upload sheet. You can provide the file in three ways:

  • from the photo library;
  • via the camera (capture a receipt directly, when available);
  • via the system file picker (any file type).

You can adjust the file name before sending. The file is transmitted to Dolibarr encoded in Base64; if a file with the same name already exists, it is overwritten.

Deleting a document

You can delete an attached document directly from the application:

  • Swipe left on a document row in the "Documents" section of a supported detail screen → reveals a red Delete action.
  • A confirmation dialog appears before the API call. Deletion is permanent on the Dolibarr side and also purges the local cached copy.
  • If your account lacks the delete right, the API returns an error and a warning message is shown.

Gradual rollout: adding and deleting from the detail-screen section are currently available on four pilot screens — Products, Customer invoices, Supplier receptions, and Bank accounts. Other screens (Third parties, Orders, Proposals, Projects, etc.) will be migrated incrementally. The unified view, on the other hand, already covers all the modules listed below for consultation and download.

Covered modules

The unified view collects the files attached to the following objects. The modulepart is the strict internal name expected by the Dolibarr API to list and download the documents of that object type.

| Module | Example objects | modulepart (API) | |---|---|---| | Third parties | Customers, prospects, suppliers | societe | | Quotes | Commercial proposals | propal | | Orders | Customer orders | commande | | Invoices | Customer invoices | facture | | Projects | Project folders | project | | Contracts | Active contracts | contract | | Supplier invoices | Purchase invoices | facture_fournisseur | | Supplier orders | Purchase orders | commande_fournisseur | | Products / Services | Product sheets | product | | Expense reports | Expense receipts | expensereport |

⚠️ Strict modulepart names: for listing (GET /documents) and PDF generation (builddoc), Dolibarr requires the canonical names above — in particular propal, facture_fournisseur, and commande_fournisseur (and not propale, invoice_supplier, or order_supplier). The pilot detail-screen sections also use reception (Supplier receptions) and bankaccount (Bank accounts).

Limitations

No global tree (manual ECM directories)

Unlike the Dolibarr web interface (ECM), there is no global document tree that can be consulted via the REST API. The manual file manager ("Manual directories" tab) is not accessible via the Dolibarr REST API, regardless of the version: files placed in these free directories therefore do not appear in HtkDoli.

Only files attached to a business object (invoice, third party, project…) are retrievable. The unified view therefore rebuilds its list by going through all the objects of each module, then querying their respective documents.

Business Behavior and Dolibarr

The behavior of the Documents module depends on the configuration and permissions defined in your Dolibarr instance.

Rights and Permissions

  • Reading and downloading: you must have read rights on the parent business object (e.g. the third party or the invoice) to be able to list and download its attached documents.
  • Add / Delete: adding new documents or deleting them requires specific modification rights on the parent object, as well as global document-management rights if configured that way in Dolibarr. Rights are not checked on the application side: if you are not authorized, the API returns an error and a warning message is shown.

Screenshots

3 screenshots — click to enlarge