title: Call a method from another model in Odoo 8
body: <p>I'm creating a custom model in ir_model <strong>"x_custom_model"</strong> with its own custom fields "x_field_name" in ir_model_fields.
  Meanwhile I'm also generating a view, which uses this model and those fields.
  In this view I'm generating a Button which when clicked, has to call a method <strong>"my_method"</strong> in an already existing model <strong>"my_model_name"</strong>.</p>
  
  <p>I'm trying to access this method while currently working in "x_custom_model".
  The problem exists in not getting the method called. Any help or tips would be appreciated</p>
  
  <p>1) I've tried giving the method name as a value of the name attribute as:</p>
  
  <pre><code>#Button attributes
  &lt;button name="my_method" type="object"/&gt;
  
  Error: x_custom_model had no attribute called "my_method"
  </code></pre>
  
  <p>2) Via server actions (Call_My_Method):
  Settings -> Actions -> Server Actions.</p>
  
  <ul>
  <li>Action Name: Call_My_Method.</li>
  <li>Base Model: x_custom_model. </li>
  <li>Action to Do: Execute Python code.</li>
  </ul>
  
  <p>Python code:</p>
  
  <pre><code>print "Am I getting here?"
  action = {"my_model_name".my_method}
  
  #Button attributes
  &lt;button name="Call_My_Method" type="action"/&gt;
  </code></pre>
  
  <p>Nothing happens, not even the print.</p>
  
  <p>I'm currently stuck on this issue and I don't seem to find much useful information about it so any help would be appreciated.</p>