title: create sequence depending on a Many2one field
body: <p>I have this object <code>project.task</code> that has many situations <code>project.task.situation</code> . In <code>project.task.situation</code> model I want to create a sequence so I added this record:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;record id="sequence_project_task_situation_seq" model="ir.sequence"&gt;
      &lt;field name="name"&gt;Project Task Situation Sequence&lt;/field&gt;
      &lt;field name="code"&gt;project.task.situation&lt;/field&gt;
      &lt;field name="prefix"&gt;Situation N°&lt;/field&gt;
      &lt;field eval="1" name="number_next"/&gt;
      &lt;field eval="1" name="number_increment"/&gt;
      &lt;field eval="False" name="company_id"/&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>In python code I added this:</p>
  
  <pre class="lang-py prettyprint-override"><code>name = fields.Char(string='Situation Number', readonly=True)
  @api.model
  def create(self, vals):
      seq = self.env['ir.sequence'].next_by_code('project.task.situation') or '/'
      vals['name'] = seq
      return super(ProjectTaskSituation, self).create(vals)
  </code></pre>
  
  <p>what I want is each task has its own situation sequence. For example for <code>task1</code> I create 2 situations so I have <code>Situation N°1</code> and <code>Situation N°2</code> after that I want to create situations for <code>task2</code> so I'll get <code>Situation N°3</code> and <code>Situation N°4</code> . Which is not good cause I want for each task to start count sequence from the start. Is this possible? How is that?</p>