[Erp5-dev] Base_viewRelatedObjectList - little enhancement

Lukasz Nowak lukasz.nowak at ventis.com.pl
Thu Sep 21 08:38:29 CEST 2006


Hello,

Dnia czwartek, 21 września 2006 01:15, Jerome Perrin napisał:
> > I wanted to override List Method while selecting objects in
> > RelationStringField. Bartek told me to put:
> >
> > python: here.Base_getRelatedObjectParameter(parameter='list_method')
> >
> > in List Method in Base_viewRelatedObjectList, so I'm able to have my own
> > list in RSF.
>
> If I understand correctly, this will only affect the "full" list shown
> when you press on the wheel, but not the "quick" list you get when you
> only click the save button or press enter. It's a problem if they are
> different.

You are absolutly right, it do not cut the set of data, when RLS is pre-filled  
by user and then form is saved.

> > Is it possibile to made such addition in erp5_core?  Or is it not
> > set here, because such method is not ERP5ish?
>
> You can already do some good filtering with related keys using "default
> parameters", this become keywords arguments to the portal_catalog query.
> For example, add "validation_state | validated" to display only
> validated documents,

And that's what I'm doing right now almost all the time.

> if it's not enough, you can still use TALES or
> define your custom related keys.

Well. As you pointed above, using TALES brings inconsistency, so I'll have to 
reengineer my current forms customization.

I wonder if it would be acceptable to implement List Method customization 
while updating form? I really do have cases, where such restrainting of set 
is very user-friendly (but only if it works with directly saved form data). I 
think that I'll put it on our enhancment list, for now with low priority 
(data could be validated with workflow after all).

Well, thanks for your suggestions.

Bye,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''



More information about the Erp5-dev mailing list