[Erp5-dev] Sale Supplies - problem with performance, some other questions

Łukasz K. Nowak lukasz.nowak at ventis.com.pl
Tue Jun 5 14:33:51 CEST 2007


Hello,

On fresh revision (14673) I've create site with erp5_[base,trade,pdm].

There I've created 2 resources: 'car' and 'wheel'.

I've created 2 organisations: 'we' and 'them'.

I've created Sale Supply, which has destination 'them'.

In those Sale Supply I've created one Sale Supply Line for 'car' and 550
for 'wheel'.

I've patched 'SupplyLine_asPredicate' with:
script.log('%s'%(context.getRelativeUrl()))

I've created Sale Order from 'we' to 'them'. I added Sale Order Line,
set resource to 'car' and...system is invoking 551 times
'SupplyLine_asPredicate' on every line in Sale Supplies - for every line
from this Sale Supply.. Huh - its quite performance disaster, I've seen,
that there might be many invocations of such predicate search.

I was just curious, and added default_supply_line to both resources -
only that 'correct' one was searched.

Is it bug or feature?

Another thing. Please look at SupplyLine_asPredicate[1]. I thought, that
defining of Purchase Supplies is done based on its source, am I right?
Is that script able to support such situation? Shall I propose tested
conditions to support sale and purchase supplies in this script?

One another. On TechnicalNoteOnPredicates[2] one can read about:
"You may want to configure the list of local properties which works like
a criterion property and the list of base categories which works like a
membership criterion base category with 2 portal defaults values:

      * portal_criterion_base_category_list, default to
        (source,destination,resource,group)
      * portal_criterion_property_list, default to
        (start_date,stop_date)"

Where is it?


Thanks in advance for any help or tips,
Luke

[1]
http://svn.erp5.org/*checkout*/erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SupplyLine_asPredicate.xml?revision=14673&content-type=text%2Fplain
[2] http://www.erp5.org/TechnicalNoteOnPredicates
-- 
Ł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...''





More information about the Erp5-dev mailing list