Discussion:
[Erp5-dev] Planning invoice is not creating related simulations
Łukasz Nowak
2008-06-16 12:16:55 UTC
Permalink
Hello,

Issue:
- add invoice
- set invoice values
- add invoice line
- set invoice line values
- plan invoice
- no simulations created
- touch invoice
- simulation created

Attached test is proving this issue. Look at commented out steps,
uncommenting them make test pass.

Is it a bug or feature? Is that issue tested anywhere?

Is my test good enough to be introduced into core suite (question
applies to tests sent recently and older, still pending w/o comments on
mailing list, eg. Container consumption tests)? If not - what should I
fix in test, what is wrong in test? Am I not passing conventions
related to test?

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: testInvoiceSimulation.py
Type: text/x-python
Size: 14274 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080616/3336a2d9/attachment.py>
Jérome Perrin
2008-06-16 13:17:08 UTC
Permalink
Hello,
Post by Łukasz Nowak
Hello,
- add invoice
- set invoice values
- add invoice line
- set invoice line values
- plan invoice
- no simulations created
- touch invoice
- simulation created
Attached test is proving this issue. Look at commented out steps,
uncommenting them make test pass.
?Thanks a lot for you effort.
Post by Łukasz Nowak
Is it a bug or feature? Is that issue tested anywhere?
To me this is a bug, and I don't think it is tested anywhere.

Delivery.updateAppliedRule is the method that initiate the simulation
process.
We have interaction workflows that call Delivery.updateApplied when
movements or delivery are modified,
delivery_movement_simulation_interaction_workflow
and ?delivery_simulation_interaction_workflow.
My guess is that simulation for invoices is generated in confirmed just
because there is a workflow script that sets references.

For Sale Order / Purchase Order, ?updateApplied is called in workflow
scripts, so I'll add such a script in accounting workflow.
Post by Łukasz Nowak
Is my test good enough to be introduced into core suite (question
applies to tests sent recently and older, still pending w/o comments on
mailing list, eg. Container consumption tests)? If not - what should I
fix in test, what is wrong in test? Am I not passing conventions
related to test?
This test is good for explaining and discussing the problem, but maybe
we should consider adding this in testInvoice (as far as I see it reuses
parts from testInvoice).

J?rome
Łukasz Nowak
2008-06-17 09:36:28 UTC
Permalink
Hello,

On 2008-06-16, 15:17:08
J?rome Perrin <jerome at nexedi.com> wrote:

(...)
Post by Jérome Perrin
Delivery.updateAppliedRule is the method that initiate the simulation
process.
We have interaction workflows that call Delivery.updateApplied when
movements or delivery are modified,
delivery_movement_simulation_interaction_workflow
and ?delivery_simulation_interaction_workflow.
My guess is that simulation for invoices is generated in confirmed
just because there is a workflow script that sets references.
For Sale Order / Purchase Order, ?updateApplied is called in workflow
scripts, so I'll add such a script in accounting workflow.
Hm. But is there any convention about it? When I saw
delivery*interaction_workflow workflows introduced I thought, that
every simulation-related actions shall be there. Are there any
guidelines about it? That one
http://www.erp5.org/Discussion/ConfigureSimulation looks quite
unfinished.
Post by Jérome Perrin
Post by Łukasz Nowak
Is my test good enough to be introduced into core suite (question
applies to tests sent recently and older, still pending w/o
comments on mailing list, eg. Container consumption tests)? If not
- what should I fix in test, what is wrong in test? Am I not
passing conventions related to test?
This test is good for explaining and discussing the problem, but maybe
we should consider adding this in testInvoice (as far as I see it
reuses parts from testInvoice).
My idea/suggestion is to create separate test for testing simulations
started by documents, which are able to create some. Is it ok? It would
be great as and documentary about simulations.
Post by Jérome Perrin
J?rome
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
?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.
Łukasz Nowak
2008-06-17 10:12:54 UTC
Permalink
Hello,

On 2008-06-16, 15:17:08
J?rome Perrin <jerome at nexedi.com> wrote:

(...)
Post by Jérome Perrin
My guess is that simulation for invoices is generated in
confirmed
Post by Jérome Perrin
just because there is a workflow script that sets references.
For Sale Order / Purchase Order, ?updateApplied is called in workflow
scripts, so I'll add such a script in accounting workflow.
Something like attached?

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: accounting_workflow_build_simulation_on_plan.patch
Type: text/x-patch
Size: 6344 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080617/084e830e/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: accounting_workflow_info.txt
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080617/084e830e/attachment.txt>
Jérome Perrin
2008-07-18 11:59:23 UTC
Permalink
Post by Łukasz Nowak
Something like attached?
Exactly :)
It's in svn, r22555. Thanks !

J?rome

Loading...