Am Sonntag, 17. August 2008 23:58:17 schrieb Paul McNett:
> Adrian Klaver wrote:
> > Try changing:
> > self.DefaultValues = {"servicedate": datetime.date.today()}
> >
> > to:
> > self.DefaultValues = {"servicedate": datetime.date.today().isoformat()}
>
> If the field is date type, you want the default value to be a date, not
> a string.
>
Yes.
> However, you probably want it to be:
> self.DefaultValues = {"servicedate": datetime.date.today}
>
> (without the '()' after 'today'). This is so that when the new record is
> added, Dabo will run that function to get the date to use, instead of
> always using the value returned from that function when the bizobj was
> instantiated.
>
This would be better for datetime fields, of course. But as long as the
application doesn't run around midnight I wouldn't do it for a date.
> This won't resolve the issue of getting that message in the log though.
>
> As I said before it sounds like everything is working, but Dabo is
> erroneously informing you of a problem that doesn't actually exist.
>
Looks like it. But I think I'll look at this a little more, if only to learn
something.
Thank you,
Sibylle
--
Dr. Sibylle Koczian
_______________________________________________
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]