[Erp5-dev] interaction workflow script on edit action and relation string fields updates

Yoshinori Okuji yo at nexedi.com
Tue Feb 27 18:29:54 CET 2007


On Tuesday 27 February 2007 18:21, Jacek Medrzycki wrote:
> Hi!
>
> I have noticed the following behaviour:
>
> I have an interaction workflow with the interaction triggered by the
> edit action:
>
> Trigger: WorkflowMethod
> Scripts (after): ['someScript']
> Methods : ['edit']
>
> The "someScript" for now does nothing except logging.
>
> Then I have a form for the A object, with RelationStringField for the
> 'destination' relation.
>
> I have found, that when a user clears the Relation String Field and then
> updates the relation by clicking the "gear box wheel" and picking the
> value from the list, then my script gets an "old" value of the
> 'destination' relation (not the one the user have just chosen, but the
> previous one).
>
> Is it "a bug or a feature"?

It is a feature, an inconvenient feature.

>
> How can I catch in interaction workflow a current value of relation
> after user updates it? I need it to update security on related object. I
> can not rely on user clicking the "save" button after updating the
> relation.

Specify the setter as well as edit. Personally, I feel that it would be more 
convenient if we always call edit.

YO
-- 
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org



More information about the Erp5-dev mailing list