**Impacted versions:**
11.0

**Steps to reproduce:**

- Create a SO with two lines:
-  - _LIne1_: Product: product50, Ordered Quantity: 1.000, Unit Price: 50.0
-  - _Line2_: Product: product12, Ordered Quantity: 1.000, Unit Price: 12.0

- Confirm the SO
- Click on "Create Invoice" (choosing for example "Invoiceable lines")
- Validate the invoice
- Click on "Add Credit Note" (choosing for example "Create a draft credit note")
- Validate the Credit Note

- Go to Reporting->Sales and open the Pivot view
- Enable the following measures:
- - Amount Invoiced
- - Amount To Invoice

- Expand the rows by Product


**Current behavior:**

- Amount Invoiced for product12 is 50.0
- Amount Invoiced for product50 is 12.0


**Expected behavior:**

- Amount Invoiced for product12 is 0.0
- Amount Invoiced for product50 is 0.0

result = []
        for so_line in self:
            name = '%s - %s' % (so_line.order_id.name, so_line.name.split('\n')[0] or so_line.product_id.name)
            if so_line.order_partner_id.ref:
                name = '%s (%s)' % (name, so_line.order_partner_id.ref)
            result.append((so_line.id, name))
        return result
    @api.model
    def name_search(self, name='', args=None, operator='ilike', limit=100):
        if operator in ('ilike', 'like', '=', '=like', '=ilike'):
            args = expression.AND([
                args or [],
                ['|', ('order_id.name', operator, name), ('name', operator, name)]
            ])
        return super(SaleOrderLine, self).name_search(name, args, operator, limit)
    @api.multi
    def unlink(self):
        if self.filtered(lambda x: x.state in ('sale', 'done')):
            raise UserError(_('You can not remove a sales order line.\nDiscard changes and try setting the quantity to 0.'))
        return super(SaleOrderLine, self).unlink()
    @api.multi
    def _get_delivered_qty(self):