title: Odoo: Conditional invisible attribute on fields only works in one direction?
body: <p>I'm trying to make a field invisible on condition in an Odoo form view.
  When "Can be sold" is checked ==> "Product Manager" should be invisible:</p>
  
  <p><a href="https://i.stack.imgur.com/fCnTB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fCnTB.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/fjsSO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fjsSO.png" alt="enter image description here"></a></p>
  
  <p>I tried using the attribute "invisible" with a domain in the inherited view of the products form:</p>
  
  <pre><code>&lt;record model="ir.ui.view" id="product_template_form_inherit"&gt;
      &lt;field name="name"&gt;product.template.product.form&lt;/field&gt;
      &lt;field name="model"&gt;product.template&lt;/field&gt;
      &lt;field name="inherit_id" ref="product.product_template_only_form_view" /&gt;
      &lt;field name="arch" type="xml"&gt;
          &lt;field name="product_manager"  position="attributes"&gt;
                      &lt;attribute name="invisible"&gt;[('sale_ok', '=', True)]&lt;/attribute&gt;
          &lt;/field&gt;    
  &lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>When the field sale_ok is true, the product_manager field is actually hidden. But <strong>when field sale_ok becomes false again</strong>, the <strong>field product_manager stays hidden</strong>.</p>
  
  <p>I also tried this instead:</p>
  
  <pre><code>&lt;field name="product_manager" attrs="{'invisible': [('sale_ok', '=', True)]}"/&gt;
  </code></pre>
  
  <p>This doesn't work either.</p>
  
  <p>I've also tried other domains like:</p>
  
  <pre><code>[('sale_ok', '==', True)]
  [('sale_ok', '!=', False)]
  [('sale_ok', '=', 'True')]
  </code></pre>
  
  <p>Not really sure what's wrong here... How to make it (in)visible when (un)checked?</p>
  
  <p>What I'm eventually after is the following thing:
  When a checkbox is checked, the form should change immediately without saving. Fields have to be added and removed. Is that possible?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I can hide/unhide product manager now with ChesuCR's answer.
  However when I try the same thing with "loc_rack" (Storage Location==>Rack) it gives error:</p>
  
  <pre><code>Field(s) `arch` failed against a constraint: Invalid view definition
  
  Error details:
  Element '&lt;field name="loc_rack"&gt;' cannot be located in parent view
  </code></pre>
  
  <p>This is the code I used:</p>
  
  <pre><code>&lt;field name="loc_rack"  position="replace"&gt;
      &lt;field name="loc_rack" attrs="{'invisible': [('sale_ok', '=', True)]}"/&gt;
  &lt;/field&gt;
  </code></pre>
  
  <p>Why can't I do the same with this field?</p>