Discussion:
[Erp5-dev] Base_edit
Sebastien Robin
2005-03-25 15:19:39 UTC
Permalink
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
Loading...