← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 791578] Re: Methods defined in fields for date, datetime, and time defaults not used

 

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

-- 
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/791578

Title:
  Methods defined in fields for date, datetime, and time defaults not
  used

Status in OpenERP Server:
  New

Bug description:
  In fields.py we define 3 methods for defaults for time, datetime, and
  date.  they work perfectly fine yet all throughout the code we have
  lambda expressions for time.strftime etc.  We should update the
  documentation, insert in to coding guidelines, and change them when we
  see them.

  the methods are field.date.today, field.time.now and
  field.datetime.now

  This will help to reduce future errors, adhere to DRY principles, and
  make it abundantly clear the preferred method for defaulting time type
  fields to the current default.  also it is nice to get rid of lambda.


References