title: How to use user fields in the domain
body: <p>I have a new model in which I have partner_ids many2many field. I have a menu for the new model. In the action I have written the below domain</p>
  
  <pre><code>&lt;field name="domain"&gt;[('partner_ids','in',[uid.partner_id.id])]&lt;/field&gt;
  </code></pre>
  
  <p>Error is getting. Please help.</p>
  
  <p>I am getting the following error</p>
  
  <blockquote>
  <pre><code>Uncaught Error: AttributeError: object has no attribute 'partner_id'
  http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:205
  Traceback:
  Error: AttributeError: object has no attribute 'partner_id'
      at F.__getattribute__ (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:205:7)
      at Object.py.PY_getAttr (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:168:176)
      at Object.py.evaluate (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:272:11)
      at Object.py.evaluate (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:272:25)
      at Object.py.evaluate (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:269:99)
      at Object.py.evaluate (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:267:111)
      at Object.py.evaluate (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:269:99)
      at Object.py.eval (http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:274:284)
      at http://localhost:8069/web/content/2371-b278aa7/web.assets_backend.js:413:136
      at Function._.each._.forEach (http://localhost:8069/web/content/2370-746c4bf/web.assets_common.js:12:558)
  
  
      class CustomAttachment(models.Model):
      _inherit = 'custom.attachment'
      _order = 'id desc'
  
  
      partner_ids = fields.Many2many('res.partner','partner_attachment_rel','attach_id','partner_id',string="File Type")
  
  in xml
  
      &lt;record id="action_attchments_attendee_event" model="ir.actions.act_window"&gt;
              &lt;field name="name"&gt;Documents&lt;/field&gt;
              &lt;field name="type"&gt;ir.actions.act_window&lt;/field&gt;
              &lt;field name="res_model"&gt;custom.attachment&lt;/field&gt;
              &lt;field name="view_type"&gt;form&lt;/field&gt;
              &lt;field name="view_id" eval="False"/&gt;
              &lt;!-- &lt;field name="domain"&gt;[('partner_ids','in',[uid.partner_id.id])]&lt;/field&gt; --&gt;
              &lt;field name="context"&gt;{'create':False,'edit':False}&lt;/field&gt;
              &lt;field name="help" type="html"&gt;
                  &lt;p class="o_view_nocontent_smiling_face"&gt;
                      Create a new document
                  &lt;/p&gt;
                  &lt;p&gt;
                      Also you will find here all the related documents and download it by clicking on any individual document.
                  &lt;/p&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  </code></pre>
  </blockquote>