//Stock Location Combo
Ext.define("App.view.CustomerCombo", {
    extend: "Ext.form.field.ComboBox",
    alias: "widget.customerCombo",
    queryMode: 'remote',
    fieldLabel: App.localeRes("Customer"),
    name: "customer",
    displayField: "name",
    valueField: "id",
    editable: true,
    tpl: '<tpl for="."><div class="x-boundlist-item">{customerName}{phone}</div></tpl>',
    displayTpl: '<tpl for=".">{customerName}{phone}</tpl>',
    autoSelect: true,
    autoSelectLast: false,
    minChars: 2,
    autoLoadOnValue: true,

    initComponent: function() {
        var me = this;
        if (!me.store)
            me.store = Ext.create("App.store.CustomerComboStore", {
                extraParams: me.params
            });

        me.callParent();
    }
});
