[trunk] analysis "Month -1" will raise error in January

Bug #654599 reported by Ferdinand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
Jigar A.

Bug Description

just tried
print (datetime.date (int(time.strftime('2010')), datetime.date.today().month-10, 1)).strftime('%Y-%m-%d')

which is equivalent to
print (datetime.date (int(time.strftime('2010')), datetime.date.today().month-1, 1)).strftime('%Y-%m-%d')
in January

will raise
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: month must be in 1..12

"Year"
domain="[('date_planned','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_planned','&gt;=',time.strftime('%%Y-01-01'))]"
will return data from calendar year instead of fiscal year which is relevant for business

please fix this as mentioned in
https://bugs.launchpad.net/bugs/626867
and add "fiscalyear -1"

sorry to be inconvenient on this issue - but it is sooooo important to get it right.

Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
importance: Undecided → Medium
milestone: none → 6.0
Changed in openobject-addons:
status: Confirmed → Fix Released
assignee: nobody → jam-openerp (jam-openerp)
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.