Skip to content
Dolibarr Module to connect the Dolibarr ERP system to Sencha Touch or Sencha Ext JS, application development frameworks.
JavaScript PHP Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Dolibarr ExtDirect

Dolibarr Module to connect the Dolibarr ERP system to Sencha Touch, a high-performance HTML5 mobile application framework or Sencha Ext JS, a business-grade web application development framework.

Ext Direct allows for seamless communication between the client-side and server-side, uses raw HTTP posts with little overhead using low data bandwidth and improved performance.

The module provides a set of Ext Direct compatible php classes.

CRUD methods you can seamless integrate in your client-side data stores:

PHP class:

class ExtDirectProduct extends Product
	public function __construct() {
	public function readProduct(stdClass $param) {
	public function createProduct($params) {
	public function updateProduct($params) {
	public function destroyProduct($params) {

Client CRUD calls:

Ext.ns(""); = {

	type: 'direct',
	api: {
		create: ExtDirectProduct.createProduct,
		read: ExtDirectProduct.readProduct,
		update: ExtDirectProduct.updateProduct,
		destroy: ExtDirectProduct.destroyProduct

	type: 'direct',
	directFn: ExtDirectProduct.readProductList,
	reader: {
		rootProperty: 'data'

// enable total property in result output
Ext.getStore('productlist').on('beforeload', function(store, operation, eOpts) {
		include_total: true
}, this);


var products = Ext.getStore('product');
var productData = {
	ref: 'CT0001',
	label: 'product 1',	
	type: 0,
	description: 'product description',
	barcode: '1234567890005',
	barcode_type: 2	
var product = Ext.create('MyApp.model.Product',productData);

	callback: function (records) {
		Ext.Array.each(records,function (record) {
			record.set('description','updated product');

For client File uploads create an upload fieldset like below, set extTID field value with related object id. Submit your form to router.php.

	xtype: 'fieldset',
	itemId: 'filefieldset',
	title: 'File',
			xtype: 'hiddenfield',
			name: 'extType',
			value: "rpc"
			xtype: 'hiddenfield',
			itemId: 'exttid',
			name: 'extTID'
			xtype: 'hiddenfield',
			name: 'extAction',
			itemId: 'extaction',
			value: "ExtDirectCommande"
			xtype: 'hiddenfield',
			name: 'extMethod',
			value: "fileUpload"
			xtype: 'hiddenfield',
			name: 'extUpload',
			value: "true"
			xtype: "filefield",
			label: "Select file",
			capture: "environment",
			name: 'file'

Currently provided Classes:

  • Authentication
  • Translation
  • Products
  • Customer orders
  • Customer shipments
  • Activity tracking
  • Customers/Suppliers
  • Contacts
  • Categories
  • Agenda
  • Supplier orders
  • Interventions

New classes will be added.

Authentication system:

The module uses an authentication system different from the usual login/password authentication. Instead authentication is done by sending a key for each app installation to the server. In the module setup page the system administrator can assign a user to the installed application and the module will return a unique access key to the app. You can also enable auto user assignment in the module setup page, advised to only use this for testing or demo purposes.

Activity tracking system:

Can be used to track when client app is started, when the app started editing or doing an action on a certain object, Following items are tracked: user, user alias, app name, time, activity name, activity status, object id.


For more details on how to use the Classes in your client side code, you can examine the provided jasmine unit tests in file extdirect/testing/test.js. You can run the test with URL "", enable auto superAdmin assignment for this and set admin language to en_US. At least three warehouses, 2 multiprice indexes and one customer-supplier with rowid 1 must be available to succeed the test. Enable barcode module with at least EAN13 activated. Enable agenda module. Enable customer and supplier order modules with stock increase/decrease enabled. Demo data from dev/initdemo should work. Add two multiprice levels and a string extrafield 'test' labeled 'Test' with default value 'test' in product setup. Rename admin username to SuperAdmin.

Supported Dolibarr Versions:

  • Min version: 3.3
  • Max version: 10.0
You can’t perform that action at this time.