summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2019-05-17 11:13:17 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2019-05-17 13:31:44 +0000
commitd48da27e641cfaf86a7f2535a6a2de3bf8d9006e (patch)
tree20b337f9a5486dfb2ce1c5a09c2ac20cd24ec262 /addons/web/static/tests/fields
parentb25fdb25b582af00f659d1ad358870fdf2970e7f (diff)
[FIX] account: Invoice Analysis total without sign
- Go to Accounting > Reports > Invoices - Go to the pivot view - Enable 'Total' and 'Untaxed Total' in the measures The Total is wrong. The sign of the total must be positive for the customer invoices and the vendors refunds; and negative for the credit notes and the vendors bills. Before this commit, the total of the credit notes and the vendors bills weren't negative. This occurs because the sign of the result of amount_total * invoice_type.sign is different of the sign of amount_total_signed. Indeed amount_total is the total amount without sign, and invoice_type.sign is used to change the sign only for the vendors bills and the vendors refunds (see https://github.com/odoo/odoo/blob/3cf9cfc985950c30c6b76480f77f5ffe53650b24/addons/account/report/account_invoice_report.py#L144). Contrariwise amount_total_signed is the total amount signed : negative for the credit notes and the vendors refunds. Later on the calculation, the total amount is multiplied to invoice_type.sign, to have the signs as expected (see https://github.com/odoo/odoo/blob/3cf9cfc985950c30c6b76480f77f5ffe53650b24/addons/account/report/account_invoice_report.py#L118) Fine tuning of this commit: 4218f3b opw-1999175
Diffstat (limited to 'addons/web/static/tests/fields')
0 files changed, 0 insertions, 0 deletions