[Erp5-dev] Price change on delivery, TargetSolver and rule property divergence tester
Łukasz Nowak
lukasz.nowak at ventis.com.pl
Thu Jan 17 11:46:32 CET 2008
Hello,
On 2008-01-17, 11:02:23
Alexandre Boeglin <alex at nexedi.com> wrote:
> Le mercredi 16 janvier 2008 à 15:57 +0100, Łukasz Nowak a écrit :
> > Hello,
>
> Hi,
>
> > 1) Is there any guide to do such modification more Nexedish way
> > (there is such need in our case)?
>
> Currently, the available documentation is at:
>
> http://www.erp5.org/Discussion/SimulationRules
> http://www.erp5.org/Discussion/SimulationRules/DivergenceSolvers
Well known to me (not always understood ;) ).
> > 2) What other tools such I use to achieve same goal?
>
> Currently in the default business template configuration, the list of
> solvers is hardcoded (in causality workflows and
> PackingList_viewSolveActionsDialog).
> This is ok as long as you use only a few solvers.
> But if you start to add more and more solvers, you might want to link
> for instance a price related solver with a price related divergence
> tester, and when solving a delivery, apply the solver(s) returned by
> the getDivergenceList() method.
Hm. For now I'm minimalistic with playing with Simulations - they are
still to cryptic for me, and available documentation is not covering
many aspects - maybe some day I'll provide our users nicer interface.
> > 3) If not (1) and and len(2) == 0 is my modification (assuming full
> > implementation related test coverage) safe enough?
>
> What you did was good, you could also have created a new Target Solver
> to handle your pricing issue (inheriting from CopyToTarget)
>
> To make a new Solver effective from a different Product, you have to
> import it like this:
>
> 8< - - - -
> from Products.ERP5 import TargetSolver
> import sys
> import MyNewSolver
>
> TargetSolver.MyNewSolver = MyNewSolver
> sys.modules['Products.ERP5.TargetSolver.MyNewSolver'] \
> = MyNewSolver
> 8< - - - -
Good to know, that I done something right (it is very important
psychological issue for me ;) ).
Thanks for great importing tip (less patch-o-matic in system).
> Regards,
> Alex
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.
More information about the Erp5-dev
mailing list