//Stock Location Combo
Ext.define("App.view.LocationCombo", {
    extend: "Ext.form.field.ComboBox",
    alias: "widget.locationCombo",

    fieldLabel: App.localeRes("Location"),
    name: "location",
    displayField: "code",
    valueField: "code",
    editable: true,
    tpl: '<tpl for="."><div class="x-boundlist-item">{code} {name}</div></tpl>',
    displayTpl: '<tpl for=".">{code}</tpl>',

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

        me.callParent();
    }
});
