diff options
| author | Goffin Simon <sig@odoo.com> | 2019-04-02 09:21:49 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2019-04-02 09:27:49 +0000 |
| commit | fced5d1e952bfe474ac33ed2da82cbe5e5ff3f48 (patch) | |
| tree | 40cecaf66d4068b515b3d210325c380994ea4b73 /addons | |
| parent | 0218b7fcd38d05a7ba55b812508fe360b9ea423a (diff) | |
[FIX] web: Wrong comparison in invoice analyes
Steps to reproduce the bug:
Let's consider that we are in 2019
- Create two customer invoices: I1 and I2
- I1 with invoice date = 2 april 2019 and amount = 100€
- I2 with invoice date = 2 april 2018 and amount = 1000€
- Go to Reporting > Invoices
- Click on widget "Time Ranges" and set "Based on" Invoice Date and "Range" This Year "Compare To" Previous Year
Bug:
The untaxed total for previous year was 1100€ instead of 1000€ because it counted previous year and this year.
opw:1962027
closes odoo/odoo#32331
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/core/domain.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/core/domain.js b/addons/web/static/src/js/core/domain.js index c31feb61a8f..00c8dcb83d4 100644 --- a/addons/web/static/src/js/core/domain.js +++ b/addons/web/static/src/js/core/domain.js @@ -258,8 +258,8 @@ var Domain = collections.Tree.extend({ }); break; case 'previous_year': - leftBoundaryParams.years = leftBoundaryParams.years ? leftBoundaryParams.years-- : -1; - rightBoundaryParams.years = rightBoundaryParams.years ? rightBoundaryParams.years-- : -1; + leftBoundaryParams.years = leftBoundaryParams.years ? leftBoundaryParams.years - 1 : -1; + rightBoundaryParams.years = rightBoundaryParams.years ? rightBoundaryParams.years - 1 : -1; break; } |
