← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 791117] Re: formatLang with date=True gives ValueError

 

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.

** Project changed: openobject-server => openobject-addons

** Changed in: openobject-addons
   Importance: Undecided => Low

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/791117

Title:
  formatLang with date=True gives ValueError

Status in OpenERP Modules (addons):
  Confirmed

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


References