title: Call python object - odoo 9
body: <p>In python console(jupyter) I use a python library in the form:</p>
  
  <pre><code>class SomeClass(object) 
      def __init__(self, arg1, arg2):
          ... 
      def fct1(self):
          ...
      return something
  </code></pre>
  
  <p>And I get no problem creating an object with:</p>
  
  <pre><code>x = SomeClass(arg1,arg2)
  </code></pre>
  
  <p>I would like to use those methods in Odoo. 
  I tried the following:</p>
  
  <pre><code>class SomeClass(**models.Model**)
      def **connect**(self, arg1, arg2):
          ...
      def fct1(self):
          ...
      return something
  </code></pre>
  
  <p>Replacing "object" with "model,Models" to have it as an odoo class + renaming <strong>init</strong> with a method name.</p>
  
  <p>But </p>
  
  <pre><code>x = connect(arg1,arg2)
  </code></pre>
  
  <p>returns :</p>
  
  <p>NameError: global name 'connect' is not defined</p>
  
  <p>How would I use my python library in Odoo (new API)?</p>
  
  <p>TIA</p>
  
  <h1>UPDATE:</h1>
  
  <p>I also tried calling</p>
  
  <blockquote>
    <p>x= self.connect(arg1,arg2) or
     x=SomeClass.connect(arg1,arg2)</p>
  </blockquote>
  
  <p>but it return "None" when I "print x". I think an instance is not created </p>