def register
      return self if registered?
      mod_instance = self
      sess = @session
      # class Class < SugarCRM::Base
      #   module_name = "Accounts"
      # end
      klass = Class.new(SugarCRM::Base) do
        self._module = mod_instance
        self.session = sess
      end
      
      # class Account < SugarCRM::Base
      @session.namespace_const.const_set self.klass, klass
      self
    end
def register
      return self if registered?
      mod_instance = self
      sess = @session
      # class Class < SugarCRM::Base
      #   module_name = "Accounts"
      # end
      klass = Class.new(SugarCRM::Base) do
        self._module = mod_instance
        self.session = sess
      end
      
      # class Account < SugarCRM::Base
      @session.namespace_const.const_set self.klass, klass
      self
    end
Registers a single module by name
 Adds module to SugarCRM.modules (SugarCRM.modules << Module.new("Users"))
 Adds module class to SugarCRM parent module (SugarCRM.constants << User)
 Note, SugarCRM::User.module == Module.find("Users")