[Erp5-dev] Base_edit

Sebastien Robin seb at nexedi.com
Fri Mar 25 16:19:39 CET 2005


Hi all,

I have modified Base_edit so that it will use None values instead of empty 
strings.

For example, if you put nothing in the title (or if you delete it), 
previously Base_edit called edit like this:
edit(title='').

Now, I have modified it so edit is called like this:
edit(title=None).

This is important because if the value is equal to the empty string, then 
the acquisition will not work. So it is important to set None values.

It is also important to not set default properties to the empty string, 
for example the title was defined like this :
        {   'id'          : 'title',
            'description' : '',
            'default'       : '',  --> remove it
            'type'        : 'string',
            'mode'        : 'w' },

I had to remove the default value, or edit will think that the user has 
changed it from the empty string to None.


Regards 

  Seb.
-- 
Sebastien Robin, Nexedi Technical Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com



More information about the Erp5-dev mailing list