On Sun, Jan 2, 2011 at 2:12 PM, Ed Leafe <[email protected]> wrote:
> On Jan 2, 2011, at 2:56 PM, Carey Gagnon wrote:
>
> > Given the following in my bizobj file:
> >
> > self.DefaultValues = {"datecreated": datetime.date.today()}
> >
> > will this value automatically be added to a new saved record even if the
> > field is not include in the data entry form?
>
> Yes; it doesn't need to be displayed to take effect.
>
>
> -- Ed Leafe
>
Thanks Ed...but now to take this one step further, can I do the following
(I really only need the 2 digit year) ?
self.DefaultValues = {"datecreated": self.getTwoDigitYear}
def getTwoDigitYear(self):
now = datetime.datetime.now()
twodigityear = now.strftime("%y")
return twodigityear
-- Carey
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]