[Erp5-dev] Relation String Field - using something other than title

Łukasz Nowak lukasz.nowak at ventis.com.pl
Mon Aug 6 11:38:21 CEST 2007


Hello,

I've got two types: A and B. I want to relate A -> B by category
'category'.

So for type A I've created form which has RelationStringField:

my_category_title

Configured as said on wiki[1].

All works fine. But my type B has also shu_prop property, which is
catalogued. So I created another RelationStringField for A type with:

my_category_shu_prop

And set 'Catalog Index' to shu_prop.

Almost all works great:
 * my newly created field sets relation between A and B
 * I'm able to narrow searching in shu_prop field by typing some parts
of shu_prop property
 * even my_category_title is updated (because it is reading from
object the relating category, isn't it? (or smth similar))

Only thing, which do not work, is that on my_category_shu_prop no text
is shown and so no jump field is available, etc.

How my I gain such behaviour? Shall I patch ERP5Type/Utils.py and
ERP5Type/Accessors/Value.py and create there getter/setter for ShuProp?

I've create script in portal_skins getCategoryShuProp, but it is not
invoked.

Any tips welcome.

Regards,
Luke

[1]http://www.erp5.org/HowToConfigureRelationField
-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''



More information about the Erp5-dev mailing list