formatLang with date=True gives ValueError

Bug #791117 reported by ViktorNagy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

I've put [[ formatLang(o.create_date, date=True) ]] in a sale.order report, but it returns None.
After getting into ipdb, I've found out that str(value) does not work.

Here is the relevant traceback:

ValueError: ValueErr...:28:04',)
> /home/akasha/versioning/bzr/openerp-6/server/bin/report/report_sxw.py(299)formatLang()
    298 if date or date_time:
--> 299 if not str(value):
    300 return ''

ipdb> value
'2011-06-01 09:28:04'
ipdb> str(value)
*** ValueError: unconverted data remains: 09:28:04
ipdb> value
'2011-06-01 09:28:04'
ipdb> type(value)
<class 'report.report_sxw._date_format'>

I'm using rev3356

Related branches

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

This field is defined as a date type in py file and shows this field as a datetime manner in sale order view using datetime widget, Which is not proper.

Regarding the traceback of specified bug did not face by me but the date is not printed in my output report.

Thanks.

affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello,

I have checked the description as you describe and I have fixed the problem related to datetime widget.
but still create_date field is not printed in my output report because of framework problem.

I have test this using another date field instead of create_date field and its working fine.

And i have fixed the problem related to datetime widget in lp:~openerp-dev/openobject-addons/trunk-bug-791117-ara branch.

I request community team to assign this bug to framework.

Thanks,
ara

Changed in openobject-addons:
status: In Progress → Confirmed
Amit Parik (amit-parik)
affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP's Framework R&D (openerp-dev-framework)
status: Confirmed → In Progress
status: In Progress → Confirmed
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello,

Thanks for reporting.

It has been fixed at lp:~openerp-dev/openobject-server/trunk-bug-791117-ysa and it will be merged soon to the trunk server.

Thanks,

Changed in openobject-server:
status: In Progress → Fix Committed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

The corresponding fix was merged in trunk at revision 3610 rev-id: <email address hidden>
Thanks for reporting!

Changed in openobject-server:
milestone: none → 6.1
status: Fix Committed → 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.