diff --git a/product/ERP5/AggregatedAmountList.py b/product/ERP5/AggregatedAmountList.py index 429328448a84eba46258433bd30b86361022946b..d0f2a3cafb3cc2cbdca191bfcbaa06fce91ffd8e 100644 --- a/product/ERP5/AggregatedAmountList.py +++ b/product/ERP5/AggregatedAmountList.py @@ -34,7 +34,8 @@ from Globals import InitializeClass from Products.PythonScripts.Utility import allow_class from AccessControl import ClassSecurityInfo -from Products.ERP5.interfaces.transformation import IAggregatedAmountList +from Products.ERP5.interfaces.aggregated_amount_list \ + import IAggregatedAmountList class AggregatedAmountList(UserList): """ diff --git a/product/ERP5/interfaces/aggregated_amount_list.py b/product/ERP5/interfaces/aggregated_amount_list.py new file mode 100644 index 0000000000000000000000000000000000000000..78a6d4246f2ffdf67f716c82786ff0b08d38b8a6 --- /dev/null +++ b/product/ERP5/interfaces/aggregated_amount_list.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved. +# Jean-Paul Smets-Solanes <jp@nexedi.com> +# Åukasz Nowak <luke@nexedi.com> +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +from zope.interface import Interface + +try: + from zope.interface.common.sequence import ISequence +except ImportError: + # ISequence does not exists in old zope.interface versions + class ISequence(Interface): + pass + +class IAggregatedAmountList(ISequence): + """An Aggregated Amount List is a list of amounts aggregated together. + + It is a sequence of objects implementing IAmount interface. + """ + diff --git a/product/ERP5/interfaces/delivery_solver.py b/product/ERP5/interfaces/delivery_solver.py new file mode 100644 index 0000000000000000000000000000000000000000..4427ccaed8df0fa6d451bb515d42e4b73a409076 --- /dev/null +++ b/product/ERP5/interfaces/delivery_solver.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved. +# Åukasz Nowak <luke@nexedi.com> +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +from zope.interface import Interface + +class IDeliverySolver(Interface): + """Solves quantity values between delivery line and related simulation movements""" + # placeholder to define + pass + diff --git a/product/ERP5/interfaces/divergence_solver.py b/product/ERP5/interfaces/divergence_solver.py index 7456d5786bd8e01e96406831308d9ef5f5c1437e..bf18fcd9850cdbdf1ef37304c0c2706bd5af8364 100644 --- a/product/ERP5/interfaces/divergence_solver.py +++ b/product/ERP5/interfaces/divergence_solver.py @@ -5,10 +5,10 @@ # Åukasz Nowak <luke@nexedi.com> # # WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential +# programmers who take the whole responsibility of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software +# guarantees and support are strongly advised to contract a Free Software # Service Company # # This program is Free Software; you can redistribute it and/or @@ -37,13 +37,3 @@ class IDivergenceSolver(Interface): decision_list is list of instances of DivergenceSolutionDecision class """ - -class IDeliverySolver(Interface): - """Solves quantity values between delivery line and related simulation movements""" - # placeholder to define - pass - -class ITargetSolver(Interface): - """Solves changes of properties up to simulation tree with taking proper decisions""" - # placeholder to define - pass diff --git a/product/ERP5/interfaces/target_solver.py b/product/ERP5/interfaces/target_solver.py new file mode 100644 index 0000000000000000000000000000000000000000..cd982cf3c0c88d201548a6c851ee768a40fe0301 --- /dev/null +++ b/product/ERP5/interfaces/target_solver.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved. +# Åukasz Nowak <luke@nexedi.com> +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +from zope.interface import Interface + +class ITargetSolver(Interface): + """Solves changes of properties up to simulation tree with taking proper decisions""" + # placeholder to define + pass diff --git a/product/ERP5/interfaces/transformation.py b/product/ERP5/interfaces/transformation.py index 40d1d6d7d39b8b12ed2729096d35854618d16a59..2ac6fad50cd4b3cf8bf101e9d351b0b8f84ec199 100644 --- a/product/ERP5/interfaces/transformation.py +++ b/product/ERP5/interfaces/transformation.py @@ -30,14 +30,6 @@ from zope.interface import Interface -try: - from zope.interface.common.sequence import ISequence -except ImportError: - # ISequence does not exists in old zope.interface versions - class ISequence(Interface): - pass - - class ITransformation(Interface): """ Common Interface to implementing querying of indirect amount @@ -82,11 +74,3 @@ class ITransformation(Interface): * movement_to_delete_list - a list of movements from movement_list or from the context that shall be deleted. """ - - -class IAggregatedAmountList(ISequence): - """An Aggregated Amount List is a list of amounts aggregated together. - - It is a sequence of objects implementing IAmount interface. - """ - diff --git a/product/ERP5/tests/testERP5Interfaces.py b/product/ERP5/tests/testERP5Interfaces.py index d15e5e3d232b78dbbd4eef613b363a32c0f70bb3..7d1bba2442a5b540bccce92bc58413a21b085658 100644 --- a/product/ERP5/tests/testERP5Interfaces.py +++ b/product/ERP5/tests/testERP5Interfaces.py @@ -64,7 +64,8 @@ class TestERP5Interfaces(ERP5TypeTestCase): def test_AggregatedAmountList_implements_IAggregatedAmountList(self): # AggregatedAmountList is not a document - from Products.ERP5.interfaces.transformation import IAggregatedAmountList + from Products.ERP5.interfaces.aggregated_amount_list \ + import IAggregatedAmountList from Products.ERP5.AggregatedAmountList import AggregatedAmountList verifyClass(IAggregatedAmountList, AggregatedAmountList)