title: Deleting a line from the one2many field with constraint on unique sequence
body: <p>I created an object "scanning.invoice.approval.rule", in which I defined a one2many field:</p>
  
  <pre><code>approval_line_ids = fields.One2many(
      'scanning.invoice.approval.line', 'rule_id', string='Approval Lines') 
  </code></pre>
  
  <p>this line object is defined as such:</p>
  
  <pre><code>class InvoiceApprovalRuleLine(models.Model):
      _name = 'scanning.invoice.approval.line' 
      _order = 'sequence ASC'
  
      rule_id = fields.Many2one(
          'scanning.invoice.approval.rule', 'Approval Rule', required=True, ondelete='cascade') 
      user_id = fields.Many2one('res.users', 'User', ondelete='cascade')
      sequence = fields.Integer()
  
      @api.multi
      @api.constrains('sequence')
      def _validate_sequence(self): 
          for rec in self:
              for line in rec.rule_id.approval_line_ids:
                  if line == rec:
                      continue
                  if line.sequence == rec.sequence:
                      raise ValidationError(_('Multiple Roles with sequence %s exist') % rec.sequence)
  </code></pre>
  
  <p>the problem is when I add a rule and lines and save, then edit again, remove one line with sequence 1 for example, then add new line with same sequence 1 as the deleted line then save, the constrains is raised despite I just removed one line and added another with the same sequence, I hope this is clear, and thank a lot for all your help</p>
  
  <p>Any ideas on how to solve it?</p>