[6.1]Invalid "Year" filter domain in sale.report.search

Bug #1179398 reported by Yann Papouin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned
OpenERP Community Backports (Addons)
Fix Released
Medium
Yann Papouin
6.1
Fix Released
Medium
Unassigned

Bug Description

The sale analysis search views domain for the "Year" field is incorrect, when a user create a custom dashboard based on this, it returns non updated values:

./addons/sale/report/sale_report_view.xml

BUG:
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-01-01'))]"

FIX:
domain="[('date','<=', time.strftime('%%Y-12-31')),('date','>=',time.strftime('%%Y-01-01'))]"

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Yaan,

Your fix is not bad, which will improved the behavior. But lets take this on another context. Lets take one example:
Today I open the my production OpenERP and try to search the current year's record, then there might be not possible we have made the future sales order. Then what this domain will search, it will search the record up to today of current year. So I don't think it will create any issue.

Indeed, when we create the future sales order then and only then problem will appears.

This issue is only exist on stable 6.1. On v7 and trunk behavior are totally changed.
For this type of stable version's issue, If you have support and maintenance contract with us then you can contact our OPW team at <email address hidden>

Thank you!

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Yann Papouin (yann-papouin) wrote :

But in your case, we just have to add a new filter to limit date <= today to get previous behavior.

The main issue with the existing behavior is that a user doesn't understand why data is not updated when this view is added to dashboard.

Changed in ocb-addons:
assignee: nobody → Yann Papouin (yann-papouin)
Changed in ocb-addons:
status: New → Confirmed
importance: Undecided → Medium
Changed in ocb-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.