title: How do I get the value from a form field using Odoo?
body: <p>I have this field in a form view:</p>
  
  <pre><code>&lt;field name="value"/&gt;
  </code></pre>
  
  <p>I want to get the value from the field when someone wants to add a new value, the way that I might do <code>$_GET['value']</code> in PHP.</p>
  
  <p>Simple example:</p>
  
  <p>I want, when the user inserts a value, for the program to check if it is greater than sum of all values and print an error message like:</p>
  
  <blockquote>
    <p>Cannot add the value because it is greater than the sum of all values</p>
  </blockquote>
  
  <p>I've written this so far:</p>
  
  <h2>view.xml</h2>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;openerp&gt;
  &lt;data&gt;
      &lt;record id="action_test" model="ir.actions.act_window"&gt;
              &lt;field name="name"&gt;Insert&lt;/field&gt;
              &lt;field name="res_model"&gt;test.odoo&lt;/field&gt;
              &lt;field name="view_mode"&gt;form,tree&lt;/field&gt;
      &lt;/record&gt;
  
      &lt;record id="view_tree_test" model="ir.ui.view"&gt;
          &lt;field name="name"&gt;Inset.tree&lt;/field&gt;
          &lt;field name="model"&gt;test.odoo&lt;/field&gt;
          &lt;field name="arch" type="xml"&gt;
              &lt;tree string="T"&gt;
                  &lt;field name="create_uid"/&gt;
                  &lt;field name="value" sum="Total Sum"/&gt;
              &lt;/tree&gt;
          &lt;/field&gt;
      &lt;/record&gt;
  
      &lt;record id="view_from_test" model="ir.ui.view"&gt;
          &lt;field name="name"&gt;Inset.form&lt;/field&gt;
          &lt;field name="model"&gt;test.odoo&lt;/field&gt;
          &lt;field name="arch" type="xml"&gt;
              &lt;form string="T_Form"&gt;
                  &lt;group&gt;
                      &lt;field name="value"/&gt;
                  &lt;/group&gt;
              &lt;/form&gt;
          &lt;/field&gt;
      &lt;/record&gt;
  
  
      &lt;menuitem name="Test Module" id="main_menu_test" sequence="3"/&gt;
  
      &lt;menuitem name="TEST" id="sub_menu" parent="main_menu_test"/&gt;
  
      &lt;menuitem action="action_test" id="action_menu" parent="sub_menu" /&gt;
  &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>
  
  <h2>test.py</h2>
  
  <pre class="lang-python prettyprint-override"><code>from openerp import models
  from openerp import fields
  
  class test(models.Model):
      _name = "test.odoo"
      value = fields.Integer()
  </code></pre>