title: Magento: how to override a model in a local module
body: <p>I'm trying to override in the local folder a module which is in the local folder also, but I don't know if it's possible. This is what I've done.</p>
  
  <p>I've created /local/Mycompany/Modulename/Model/Model.php which i'd like to override the /local/Othercompany/Modulename/Model/Model.php</p>
  
  <p>my model.php is:</p>
  
  <pre><code>class Mycompany_Modulename_Model_Model extends Othercompany_Modulename_Model_Model 
  </code></pre>
  
  <p>{
  ...
  }</p>
  
  <p>and my config.xml</p>
  
  <pre><code>&lt;global&gt;
  &lt;models&gt;
      &lt;othercompanymodulename&gt;
      &lt;rewrite&gt;
          &lt;model&gt;Mycompany_Modulename_Model_Model&lt;/model&gt;
      &lt;/rewrite&gt;
      &lt;/othercompanymodulename&gt;
  &lt;/models&gt;
  </code></pre>
  
  <p></p>
  
  <p>The class is been instantiated whith Mage::getModel('othercompanymodulename/model')</p>
  
  <p>My Mycompany_Mymodule.xml</p>
  
  <pre><code>&lt;config&gt;
  &lt;modules&gt;
      &lt;Mycompany_Modulename&gt;
          &lt;active&gt;true&lt;/active&gt;
          &lt;codePool&gt;local&lt;/codePool&gt;
      &lt;depend&gt;
          &lt;Othercompany_Modulename/&gt;
          &lt;/depend&gt;
      &lt;/Mycompany_Modulename&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p></p>
  
  <p>But my module is ignored. Is possible to override in local folder a class located also in local folder? What I'm doing wrong?</p>