title: How to set domain with a many2one
body: <p>I have a many2one that links to event.event called xx_event_id. In event.event I made a link to xx_weeks that is a separate model that keeps a list of weeks. Then the name of those weeks also links to a model called xx_week_name.</p>
  
  <p>I'm trying to make a domain on xx_week_name. When I select an event I only want it to show the week names that are in the event.</p>
  
  <p>So my xml looks like this:</p>
  
  <pre><code>&lt;field name="xx_week_name" domain="[('id', 'in', xx_event_id.xx_weeks.name)]"/&gt;
  </code></pre>
  
  <p>Yet it gives an error:</p>
  
  <pre><code>Uncaught Error: AttributeError: object has no attribute 'xx_weeks'
  </code></pre>