Discussion:
[Erp5-dev] Order Builder some questions
Łukasz Nowak
2007-09-27 11:12:35 UTC
Permalink
Hello,

As you might noted I'm playing with Order Builders and trying to create
some kind of how-to for them[1]. BTW I welcome anyone to contribute :)

I see Predicate view on Order Builder configuration and some XXX in
OrderBuilder.py

So this is my list of issues:
a) only Resources of 'resource_portal_type' will be used
b) using predicates to fetch resources is not implemented yet (I've
set up dummy not existing method 'uuuk' in Test Method ID and no
problem was given)
c) a) could be configured in predicates as identity criterion?
d) predicates might be used to select types of resources which will be
taken by this builder - eg. if I categorise resources by it possibility
to produce it might be used by builder which propose production orders?
e) if b) is true when it will be supported?
f) if b) and d) are true will anyone help me with implementing it?
h) there are 9 XXX in ERP5/Document/OrderBuilder.py - are there any
plans to fix it? and same as in f)

I'd like to synchronise my implementation with current development to
be able to contribute as much as possible.

Regards,
Luke

[1] http://www.erp5.org/HowToUseAndDefineOrderBuilder
--
?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...''
Łukasz Nowak
2007-10-02 13:58:36 UTC
Permalink
Hello Luke, ;)

On 2007-09-27, 13:12:35
Post by Łukasz Nowak
Hello,
As you might noted I'm playing with Order Builders and trying to
create some kind of how-to for them[1]. BTW I welcome anyone to
contribute :)
I see Predicate view on Order Builder configuration and some XXX in
OrderBuilder.py
(...)
Post by Łukasz Nowak
b) using predicates to fetch resources is not implemented yet
(I've
Post by Łukasz Nowak
set up dummy not existing method 'uuuk' in Test Method ID and no
problem was given)
(...)

Is attached patch good usage of predicates in sens of order builder? I
think, that those predicates shall narrow order builder to choose only
those resources, that implementer will want by defining predicate
criterion's.

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...''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OrderBuilder.py-using-of-predicates.patch
Type: text/x-patch
Size: 1610 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20071002/a3390838/attachment.bin>
Łukasz Nowak
2007-10-02 14:08:37 UTC
Permalink
Hello Luke, ;)

On 2007-10-02, 15:58:36
Post by Łukasz Nowak
Post by Łukasz Nowak
I see Predicate view on Order Builder configuration and some XXX in
OrderBuilder.py
(...)
Post by Łukasz Nowak
b) using predicates to fetch resources is not implemented yet
(I've
Post by Łukasz Nowak
set up dummy not existing method 'uuuk' in Test Method ID and no
problem was given)
(...)
Is attached patch good usage of predicates in sens of order builder? I
think, that those predicates shall narrow order builder to choose only
those resources, that implementer will want by defining predicate
criterion's.
BTW - where are tests for OrderBuilder/portal_orders? I'd like to
extend them and learn from them a little, but greping in tests dirs
won't help me :(

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...''
bartek
2007-10-02 14:11:18 UTC
Permalink
Er... is is a single-threaded operation, or a split personality?

;)

B.
Post by Łukasz Nowak
Hello Luke, ;)
On 2007-10-02, 15:58:36
Post by Łukasz Nowak
Post by Łukasz Nowak
I see Predicate view on Order Builder configuration and some XXX in
OrderBuilder.py
(...)
Post by Łukasz Nowak
b) using predicates to fetch resources is not implemented yet
(I've
Post by Łukasz Nowak
set up dummy not existing method 'uuuk' in Test Method ID and no
problem was given)
(...)
Is attached patch good usage of predicates in sens of order builder? I
think, that those predicates shall narrow order builder to choose only
those resources, that implementer will want by defining predicate
criterion's.
BTW - where are tests for OrderBuilder/portal_orders? I'd like to
extend them and learn from them a little, but greping in tests dirs
won't help me :(
Regards,
Luke
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Łukasz Nowak
2007-10-02 14:27:24 UTC
Permalink
Hi Bartek,

On 2007-10-02, 16:11:18
Post by bartek
Er... is is a single-threaded operation, or a split personality?
;)
I dunno. Ask Luke. Maybe he used too much source...

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...''
Łukasz Nowak
2007-10-03 09:01:45 UTC
Permalink
Hello,

On 2007-09-27, 13:12:35
?ukasz Nowak <lukasz.nowak at ventis.com.pl> wrote:

(...)
Post by Łukasz Nowak
a) only Resources of 'resource_portal_type' will be used
b) using predicates to fetch resources is not implemented yet (I've
set up dummy not existing method 'uuuk' in Test Method ID and no
problem was given)
c) a) could be configured in predicates as identity criterion?
d) predicates might be used to select types of resources which will
be taken by this builder - eg. if I categorise resources by it
possibility to produce it might be used by builder which propose
production orders? e) if b) is true when it will be supported?
f) if b) and d) are true will anyone help me with implementing it?
h) there are 9 XXX in ERP5/Document/OrderBuilder.py - are there any
plans to fix it? and same as in f)
As I'm extending Order Builder capability for our needs I have few more
questions:
i) is it acceptable, that invoked order builder would leave "track" of
it on created orders?
j) what category for i) might be used on purchase, production and sale
orders? could it be causality, or there are any problems, if it would
be defined on orders?
k) if NOT i) I'm curious how is set of order builders configured
nowadays to not interfere one with another (assuming that they are
removing deliveries created by them, which aren't "touched" on next
order builder invocation iteration)
l) is anyone using order builders now in production? (it should be
a), but I assumed is true...) - if so, I'd love to read some about
experience

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...''
Łukasz Nowak
2007-10-03 16:23:39 UTC
Permalink
Hello,

On 2007-09-27, 13:12:35
?ukasz Nowak <lukasz.nowak at ventis.com.pl> wrote:

(...)

I've modifified OrderBuilder.py much more than yesterday. I'm attaching
it as full file, not a diff, unit test for functionality which is (I
assume) needed is attached.

min_flow - I assumed it is MOQ - minimum order quantity - so if there
is lack of 5 resources, and MOQ = 7 then system will get 7, but if
there is lack of 8 - 8 will be purchased

max_delay - no change, but I re-enabled getNextNegativeInventoryDate -
and tested a little.

As I wasn't able to find any test for OrderBuilder I've created
skeleton from scratch. If anyone will confirm my predicate usage I'll
write some unit test for it.

Comments are welcome.

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...''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OrderBuilder.py
Type: text/x-python
Size: 25312 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20071003/268b7f99/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testVentisOrderBuilder.py
Type: text/x-python
Size: 13085 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20071003/268b7f99/attachment-0001.py>
Loading...