title: OpenERP / Odoo using domain for many2one in xml view
body: <p>I try to set invisible attribute to a field depending on a field in many2one relation:</p>
  
  <p>In fact, I have a model M1 with a field <em>option</em> and a field <em>m2_id</em> which is a m2o relation to model M2 that contains a field category (a selection field with values val1/val2)</p>
  
  <p><em>M1: option (text), m2_id (many2one)</em></p>
  
  <p><em>M2: category (selection)</em></p>
  
  <p>My purpose is to show/hide the field <em>option</em> depending on the value of m2.category</p>
  
  <p>Normally this must work:</p>
  
  <pre><code>&lt;field name="m2_id" /&gt;
  &lt;field name="option" attrs="{'invisible': [('m2_id.category','=','val1')]}" /&gt;
  </code></pre>
  
  <p>But this generates a runtime error:</p>
  
  <pre><code>Error: unknown field m2_id.category in domain [["m2_id.category","=","val1"]]
  </code></pre>
  
  <p>I tried to set the attribute directly like this:</p>
  
  <pre><code>&lt;field name="option" invisible="[('m2_id.category','=','val1')]" /&gt;
  </code></pre>
  
  <p>but it expects a value not an expression. so, it's considered as <em>True</em> all the time.</p>
  
  <p>Please any idea or suggestion ?</p>