title: Hide One2many field Conditionally Odoo/OpenERP
body: <p>I am creating an option called Master Account within the customer portion of an Odoo 8.0 setup. If selected, it will set another account as the grandparent. This is useful for companies/customers who have multiple locations, but just one billing center. I was able to apply this functionality, but now I do not want to display the option to set a master account to a company that is already set as someone's master. </p>
  
  <p>I have tried the following and it does not work:</p>
  
  <p>PYTHON</p>
  
  <pre><code>from openerp import models, fields, api, _
  
  class res_partner(models.Model):
      _inherit = 'res.partner'
  
      related_partner_id = fields.Many2one('res.partner', 'Master Account')
      related_partner_ids = fields.One2many('res.partner', 'Master Account')
  </code></pre>
  
  <p>XML</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;openerp&gt;
      &lt;data&gt;
          &lt;record model="ir.ui.view" id="base_view_partner_demo_inherit"&gt;
              &lt;field name="name"&gt;res.partner.form.demo&lt;/field&gt;
              &lt;field name="model"&gt;res.partner&lt;/field&gt;
              &lt;field name="inherit_id" ref="base.view_partner_form" /&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;field name="website" position="after"&gt;
                      &lt;field name="related_partner_id" attrs="{'invisible': [('related_partner_ids','&gt;', '0')]}"/&gt;
                 &lt;field name="related_partner_ids"  invisible="1"/&gt;
                 &lt;label string="Master Account" attrs="{'invisible': [['related_partner_id', '!=', False]]}"/&gt;
                  &lt;/field&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
  
      &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated. I'm brand new to Odoo. </p>