[Erp5-dev] RelationStringField - Container Getter Method

Shresth K shresth.k at gmail.com
Thu May 31 09:38:57 CEST 2007


Had been away for a while.

On 24/05/07, Romain Courteaud <romain at nexedi.com> wrote:
>
> * Shresth K [2007-05-21 20:23:14 +0530]:
>
> > Do you mean that it was *included* by mistake as it is present in the
> > current implementation and I hope it is, because I can see a use case
> where
> > it is needed.
> >
> > The expected beheviour was to return the container object, and it was
> > >not possible for the user to choose where to create the object.
> > >http://svn.erp5.org/?view=rev&revision=5582
>
> The parameter is still present in the configuration, but not used
> anymore in the current implementation (because it was removed by
> mistake).
>
> So, it currently does not work.
>
> This feature has to be readded in the system. For preventing futur errors,
> a
> Selenium test also needs to be written (in
>
> http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/
> ),
> but I don't have time for fixing it currently.
>
> Feel free to submit a patch for the fix and the test if you already
> wrote them ;)


I haven't yet written any tests or patch as I was in the process of
understanding the use case better. As of now this definitely is needed and
as confirmed by you that it was there, I shall put it as a future todo. As I
am still learning the system, I don't have an insight to the extent that I
can make such modifications. Hence I was searching for the revision in which
any related implementation was reverted back but got none.  May be I need to
look harder to find something related or if anyone can help, you are most
welcome.

Herein is the use case that I have analysed and would request you to give
your opinion on it:
A sales manager may be responsible for 2 regions -  A & B
All modules exist for all regions such as Person Module A, Person Module B,
Organisation Module A, Organisation Module B to ensure access and visibility
based on region.
There are 2 sales modules - Sales-Asia, Sales-Europe
Now while creating a Sales Order, if he/she needs to create a new
Person/Organisation through the RelationStringField(while setting the
source/destination), the existing implementation has no way to know in which
module to create the new object. For e.g: Should it be Organisation Module A
or Organisation Module B
In this scenario, I find the Container Getter Method invaluable. If the
object is being created in the context of Sales Module A then the method can
decide that the object must be in {Person, Organisation} A .


Thanks,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070531/1c7fca82/attachment.htm>


More information about the Erp5-dev mailing list