**Impacted versions:**
10, 11, master, tested on runbot today
**Steps to reproduce:**
Customer and Vendor Credit Note  on invoice analysis are not rest, total is incorrect on analysis. [This commit](https://github.com/odoo/odoo/commit/ecc75092776ca11089772a970fba9638071322d9) is wrong. Field price_subtotal_signed is correct signed with invoice type(in_refund, out_refund signed negative, other signed positive. **It is correct**. BUT ail.price_subtotal_signed * invoice_type.sign is wrong multiplicate with signed again)
Note: invoice_type.sign must be only for multiplicate by quantity, no by amount_total. Read [comment](https://github.com/odoo/odoo/blob/11.0/addons/account/report/account_invoice_report.py#L136).

**Current behavior:**
Customer and vendor Credit Note amount total is sum in analysis
**Expected behavior:**
Credit Note must be rest amount, not sum.
**Solution, revert [this commit](https://github.com/odoo/odoo/commit/ecc75092776ca11089772a970fba9638071322d9)**
Video/Screenshot link (optional):

**Some Printscreen.** tested on runbot from [this branch](http://269594-10-0-19eb19.runbot9.odoo.com)
**Customer invoices**
Customer Agrolait Invoice INV/2017/0004 is Credit Note(refund) signed on negative(amount -650.00), total for this customer is **525** rest credit Note(525 + 650 - 650), but on analysis total for this customer is **1825**, this value is wrong(525 + 650 -(*- signed are convert to +) 650).
**Customer Invoice**
![image](https://user-images.githubusercontent.com/7775116/31320314-329dc74a-ac38-11e7-8a44-389ac9dbdf2a.png)
**Invoice Analysis**
![image](https://user-images.githubusercontent.com/7775116/31320320-422351c6-ac38-11e7-8b1b-a7fda4b86a3d.png)

**Vendor Invoices**
Vendor Camptocamp Invoice BILL/2017/0004 is Credit Note(refund) signed on negative(amount -10,000.00), total for this customer is **14** rest credit Note(14 + 10,000.00 - 10,000.00), but on analysis total for this Vendor is **-20,014.00**, this value is wrong(14 + 10,000.00 -(*- signed are convert to +) 10,000.00).
**Vendor Invoice**
![image](https://user-images.githubusercontent.com/7775116/31320348-ceaf21ba-ac38-11e7-841f-4dad74f8a9d7.png)
**Invoice Analysis**
![image](https://user-images.githubusercontent.com/7775116/31320400-8e587b74-ac39-11e7-94a1-424e0d1caae4.png)




addons/account/report/account_invoice_report.py
from_str = """
                FROM account_invoice_line ail
                JOIN account_invoice ai ON ai.id = ail.invoice_id
                JOIN res_partner partner ON ai.commercial_partner_id = partner.id
                LEFT JOIN product_product pr ON pr.id = ail.product_id
                left JOIN product_template pt ON pt.id = pr.product_tmpl_id
                LEFT JOIN product_uom u ON u.id = ail.uom_id
                LEFT JOIN product_uom u2 ON u2.id = pt.uom_id
                JOIN (
                    -- Temporary table to decide if the qty should be added or retrieved (Invoice vs Refund) 
                    SELECT id,(CASE
                         WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text])
                            THEN -1
                            ELSE 1
                        END) AS sign
                    FROM account_invoice ai
                ) AS invoice_type ON invoice_type.id = ai.id
        """
        return from_str
    def _group_by(self):