This is a direct copy/paste of what is in the HourBizobj.py:

    def validateRecord(self):
        ret = ""
        # Make sure that the user selected a valid client
        if self.Record.clientfk == 0:
            ret = "You must select a valid client"
        return ret

These are the steps I take:

1. run main.py - screen displays with current date and "-Please select a 
client-"

2. without doing anything else, I press the save button - no message 
gets displayed, the indciator at the bottom now says record 2/2, the 
Summary page shows 2 recordswith current date and blank client name.

Shouldn't the validateRecord have fired in this case?  Or am I 
misinterpreting?

Ed Leafe wrote:
> On Mar 16, 2009, at 7:16 AM, Frank Cazabon wrote:
>
>   
>> just had a few minutes to look at the changes over the weekend and
>> everything looks OK now.  Just one question.  You added in a
>> validateRecord method (is that what you call them in Python/Dabo?) but
>> didn't see where you call it from so assumed the framework  
>> automatically
>> called it, but that's not happening.  Do I need to put in a manual  
>> call
>> in the "presave" (or whatever it's called) method?
>>     
>
>
>       'validateRecord()' is automatically called for every changed record  
> as part of the pre-save routine. It is called after 'beforeSave()' but  
> before the call to write your changes to the database.
>
>       Are you sure you created that method in the bizobj, and spelled it  
> correctly? Is the data in the record definitely modified?
>
>
> -- Ed Leafe
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
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]

Reply via email to