[Erp5-dev] Price change on delivery, TargetSolver and rule property divergence tester
Alexandre Boeglin
alex at nexedi.com
Thu Jan 17 11:02:23 CET 2008
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
> 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.
> 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< - - - -
Regards,
Alex
More information about the Erp5-dev
mailing list