[Erp5-dev] Restricted traverse and module "concept" - confusion

Łukasz Nowak lukasz.nowak at ventis.com.pl
Thu Mar 27 14:52:50 CET 2008


Hello,

First - please look at attached test. I hope it is explaining what I
try to explain below.

In person_module there are objects with id '1' and '2'.

If I invoke '1'.getObject()restrictedTraverse('2') I've got object '2'
returned. Well - AFAIK is it ok from acquisition point of view.

But isn't it not correct from module oriented concept? Such problems
are rising in simulations, when they use restricted traverse, and then
operate on wrong object, eg. on sale_order_module/1 Sale Order instead
of sale_order_module/12312/1 Sale Order Line, which has disappeared
(has been deleted for example), but wasn't removed from simulation
movement order - but restrictedTraverse returned sale_order_module/1
while invoked on sale_order_module/12312 with parameters '1', instead
of rising exception.

Any comments, explanations, ideas welcome. I'm quite confused.

Regards,
Luke

-- 
Ł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...'' I am only craftsman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testTraverseQuestion.py
Type: text/x-python
Size: 1614 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080327/00f98fb6/attachment.py>


More information about the Erp5-dev mailing list