Discussion:
[Erp5-dev] Base_viewRelatedObjectList - little enhancement
Lukasz Nowak
2006-09-20 13:25:56 UTC
Permalink
Hello,

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. Is it possibile to made such addition in erp5_core? Or is it not set
here, because such method is not ERP5ish?

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...''
Jerome Perrin
2006-09-20 23:15:01 UTC
Permalink
Post by Lukasz Nowak
Hello,
I wanted to override List Method while selecting objects in
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.
Post by Lukasz Nowak
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, if it's not enough, you can still use TALES or
define your custom related keys.

Jerome
Lukasz Nowak
2006-09-21 06:38:29 UTC
Permalink
Hello,
Post by Jerome Perrin
Post by Lukasz Nowak
I wanted to override List Method while selecting objects in
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.
Post by Jerome Perrin
Post by Lukasz Nowak
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.
Post by Jerome Perrin
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...''
Lukasz Nowak
2006-09-21 07:05:24 UTC
Permalink
Hello,

Dnia czwartek, 21 wrze?nia 2006 01:15, Jerome Perrin napisa?:
(...)

I've updated wiki
http://wiki.erp5.org/HowToConfigureRelationField?action=diff&rev2=9&rev1=8

to inform developers, which follow my path. Please review if its
understandable.

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...''
Loading...