[Erp5-dev] proposed patch for Person

bartek bartek at erp5.pl
Thu Feb 22 19:17:23 CET 2007


Hello

I noticed an undesired behaviour - setTitle on Person object duly sets 
the title, which is then not displayed in the form, because it uses 
first_name and last_name. And there is an inconsistency, because 
getTitel returns first_name + last_name, while setTitle sets the title.

I hit this problem when I used RelationStringField which allowed 
creation - I typed the name, created new Person and it came up empty, 
which is not what one would expect.

What I'd suggest is the attached patch - setTitle should be the exact 
reverse of getTitle, and the rest of setters is redundant.

I didn't commit it, please comment if you think it is ok or not.

Bartek
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Person_patch
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070222/b704372d/attachment.txt>


More information about the Erp5-dev mailing list