title: odoo 9 how to add relational field to pivot view?
body: <p>I'm customizing Project's pivot view to show timesheet description along with task's name.</p>
  
  <p>here is my code below but when I click pivot view it shows an error</p>
  
  <pre><code>&lt;!-- Insert Project Issue Pivot Field --&gt;
  &lt;record id="project_task_custom_pivot" model="ir.ui.view"&gt;
      &lt;field name="name"&gt;project.task.custom.pivot&lt;/field&gt;
      &lt;field name="model"&gt;project.task&lt;/field&gt;
      &lt;field name="inherit_id" ref="project.view_project_task_pivot"/&gt;
      &lt;field name="arch" type="xml"&gt;
          &lt;field name="stage_id" position="after"&gt;
              &lt;field name="name" type="row"/&gt;
              &lt;field name="timesheet_ids" type="row"/&gt;
          &lt;/field&gt;
      &lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>Error below</p>
  
  <pre><code>assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True"
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I re-defined the field "timesheet_ids" as @George Daramouskas mentioned.</p>
  
  <pre><code>timesheet_ids = fields.One2many('account.analytic.line', 'task_id', string="Timesheetss", store=True)
  </code></pre>
  
  <p>But It didn't work.
  So I took a look at the source code in <a href="https://github.com/odoo/odoo/blob/9.0/openerp/fields.py#L1860" rel="nofollow noreferrer">Odoo Source</a></p>
  
  <p>The function "One2many" has no such a parameter.</p>
  
  <p>I guess the Store=True is for only regular field not related field.</p>
  
  <p>Is there any other solution for this?</p>
  
  <p>Thanks</p>