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

Łukasz Nowak lukasz.nowak at ventis.com.pl
Tue Jun 12 12:48:40 CEST 2007


Hello,

Dnia 08-06-2007, pią o godzinie 16:27 +0200, Sébastien Robin napisał(a):
(...)
> Your patch is only Sale and Purchase specific, this is not generic, so we 
> should not apply. But I understand that it makes the research faster.

Ok, understood. What about another way (attached)? It will only touch
list of portal types for correct context, so for any other usage it will
be stable.

Another thing - in Resource.py there is function _pricingSortMethod[1].
If I understand correctly it is used to find "best" supplies by its
destination category, which is fetched from context. So:

 * Purchase Supplies are compared by destination? I thought (and
implemented it like this...) to use source (well, not exactly by
source_section in our case, but that's another thing...)
 * if I'd like to modify system, to got Sale Supplies by
destination_section, and not destination - I've updated
SupplyLine_asPredicate to achive it - shall I modify this to
getDestinationSection?

Sorry for such - might be - obvious questions, but I wasn't able to find
more documents about trade, and source code analysis is not so good to
learn such behaviour.

Thanks for any tips,
Luke

[1]http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Resource.py?view=markup#_pricingSortMethod
-- 
Ł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...''

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Resource.py-optimized-another-way.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070612/89e0bf57/attachment.bin>


More information about the Erp5-dev mailing list