[Erp5-report] r27277 - in /erp5/trunk/products: ERP5/Document/ ERP5/interfaces/ ERP5Type/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 1 10:51:09 CEST 2009


Author: jp
Date: Mon Jun  1 10:51:09 2009
New Revision: 27277

URL: http://svn.erp5.org?rev=27277&view=rev
Log:
interfaces directory now follows zope naming convention - interface files use small caps - interface class use IClassName converntion - Utils is now capable of finding appropriate files and generate the class name - this commits breaks everything - global renaming of all files and classes now in progress

Added:
    erp5/trunk/products/ERP5/interfaces/
      - copied from r27231, erp5/trunk/products/ERP5/Interface/
    erp5/trunk/products/ERP5/interfaces/amount.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IAmount.py
    erp5/trunk/products/ERP5/interfaces/arrow.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IArrow.py
    erp5/trunk/products/ERP5/interfaces/business_buildable.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IBusinessBuildable.py
    erp5/trunk/products/ERP5/interfaces/business_completable.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IBusinessCompletable.py
    erp5/trunk/products/ERP5/interfaces/business_path.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IBusinessPath.py
    erp5/trunk/products/ERP5/interfaces/business_process.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IBusinessProcess.py
    erp5/trunk/products/ERP5/interfaces/business_state.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IBusinessState.py
    erp5/trunk/products/ERP5/interfaces/coordinate.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/Coordinate.py
    erp5/trunk/products/ERP5/interfaces/divergence_tester.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/DivergenceTester.py
    erp5/trunk/products/ERP5/interfaces/entity.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/Entity.py
    erp5/trunk/products/ERP5/interfaces/expandable.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/Expandable.py
    erp5/trunk/products/ERP5/interfaces/movement.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/IMovement.py
    erp5/trunk/products/ERP5/interfaces/open_order_expander.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/OpenOrderExpander.py
    erp5/trunk/products/ERP5/interfaces/predicate.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/Predicate.py
    erp5/trunk/products/ERP5/interfaces/rule.py
      - copied, changed from r27231, erp5/trunk/products/ERP5/Interface/Rule.py
    erp5/trunk/products/ERP5/interfaces/simulation_movement.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/ISimulationMovement.py
    erp5/trunk/products/ERP5/interfaces/transformation.py
      - copied unchanged from r27231, erp5/trunk/products/ERP5/Interface/ITransformation.py
Removed:
    erp5/trunk/products/ERP5/interfaces/Coordinate.py
    erp5/trunk/products/ERP5/interfaces/DivergenceTester.py
    erp5/trunk/products/ERP5/interfaces/Entity.py
    erp5/trunk/products/ERP5/interfaces/Expandable.py
    erp5/trunk/products/ERP5/interfaces/IAmount.py
    erp5/trunk/products/ERP5/interfaces/IArrow.py
    erp5/trunk/products/ERP5/interfaces/IBusinessBuildable.py
    erp5/trunk/products/ERP5/interfaces/IBusinessCompletable.py
    erp5/trunk/products/ERP5/interfaces/IBusinessPath.py
    erp5/trunk/products/ERP5/interfaces/IBusinessProcess.py
    erp5/trunk/products/ERP5/interfaces/IBusinessState.py
    erp5/trunk/products/ERP5/interfaces/IMovement.py
    erp5/trunk/products/ERP5/interfaces/ISimulationMovement.py
    erp5/trunk/products/ERP5/interfaces/ITransformation.py
    erp5/trunk/products/ERP5/interfaces/OpenOrderExpander.py
    erp5/trunk/products/ERP5/interfaces/Predicate.py
    erp5/trunk/products/ERP5/interfaces/Rule.py
Modified:
    erp5/trunk/products/ERP5/Document/Alarm.py
    erp5/trunk/products/ERP5Type/Utils.py

Modified: erp5/trunk/products/ERP5/Document/Alarm.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Alarm.py?rev=27277&r1=27276&r2=27277&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Alarm.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Alarm.py [utf8] Mon Jun  1 10:51:09 2009
@@ -30,7 +30,7 @@
 
 from AccessControl import ClassSecurityInfo
 from Products.CMFCore.utils import getToolByName
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
 from Products.ERP5Type.XMLObject import XMLObject
 from Products.ERP5Type.Base import WorkflowMethod
 from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire

Removed: erp5/trunk/products/ERP5/interfaces/Coordinate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/Coordinate.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/Coordinate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/Coordinate.py (removed)
@@ -1,58 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class Coordinate(Interface):
-  """
-    Common Interface for all Coordinate objects
-  """
-
-  def asText():
-    """
-      returns the coordinate as a text string
-
-    This method usually tries to lookup a skin named ${PortalType}_asText and
-    to use this script to display the coordinate text.
-    """
-    pass
-
-  def fromText(coordinate_text):
-    """
-      modifies the coordinate according to the input text.
-    This method usually tries to lookup a skin named ${PortalType}_fromText and
-    to use this script to modify the properties of this document.
-    """
-    pass
-
-  def standardTextFormat():
-    """
-      returns a string which defines the standard
-      string format for that coordinate
-    """
-    pass

Removed: erp5/trunk/products/ERP5/interfaces/DivergenceTester.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/DivergenceTester.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/DivergenceTester.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/DivergenceTester.py (removed)
@@ -1,46 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Rafael Monnerat <rafael at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class DivergenceTester(Interface):
-  """
-    ERP5 Divergence Tester
-  """
-
-  def test(simulation_movement):
-    """
-    This is the fast method to test, return 0 or 1.
-    It depends if the simulation_movement is divergent or not.
-    """
-    
-  def explain(simulation_movement):
-    """
-    This method returns a list of messages that contains
-    the divergence of the Delivery Line.
-    """

Removed: erp5/trunk/products/ERP5/interfaces/Entity.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/Entity.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/Entity.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/Entity.py (removed)
@@ -1,107 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class Entity(Interface):
-  """
-    Common Interface for Entity objects
-  """
-
-  def getDefaultAddress():
-    """
-      Returns the default address as a text string
-    """
-    pass
-
-  def getDefaultAddressStreetAddress():
-    """
-      Returns the default address street as a text string
-    """
-    pass
-
-  def getDefaultAddressCity():
-    """
-      Returns the default address city as a text string
-    """
-    pass
-
-  def getDefaultAddressRegion():
-    """
-      Returns the default address region as a text string
-    """
-    pass
-
-  def getDefaultAddressZipCode():
-    """
-      Returns the default address zip code as a text string
-    """
-    pass
-
-  def getDefaultTelephone():
-    """
-      Returns the default telephone as a text string
-    """
-    pass
-
-  def getDefaultFax():
-    """
-      Returns the default fax as a text string
-    """
-    pass
-
-  def getDefaultEmail():
-    """
-      Returns the default email as a text string
-    """
-    pass
-
-  def setDefaultAddress(coordinate):
-    """
-      Updates the default address from a standard text string
-    """
-    pass
-
-  def setDefaultTelephone(coordinate):
-    """
-      Updates the default telephone from a standard text string
-    """
-    pass
-
-  def setDefaultFax(coordinate):
-    """
-      Updates the default fax from a standard text string
-    """
-    pass
-
-  def setDefaultEmail(coordinate):
-    """
-      Updates the default email from a standard text string
-    """
-    pass
-

Removed: erp5/trunk/products/ERP5/interfaces/Expandable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/Expandable.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/Expandable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/Expandable.py (removed)
@@ -1,41 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class Expandable(Interface):
-  """
-    An Expandable class provides methods which trigger
-    the generation of a root applied rule in the simulation
-    and its expansion.
-  """
-
-  def expand(self, applied_rule_id=None, force=0, activate_kw=None, **kw):
-    """
-      Expand the current Expandable class into the similation
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IAmount.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IAmount.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IAmount.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IAmount.py (removed)
@@ -1,154 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 IAmount(Interface):
-  """Amount interface specification
-
-    An amount represents a quantity of a given resource
-    in a given quantity unit. Optional efficiency can be
-    specified in order to represent a loss ratio to take
-    into account in calculations. Loss ratio is normally
-    used only in Path.
-
-    The Amount interface is useful each time
-    we need to add or substract amounts of resources
-    independently of a movement. This is the case for example
-    for all Transformation related classes.
-
-    Equations:
-      net_quantity = quantity * efficiency
-
-    TODO:
-      1. make sure getTotalPrice has or does not
-         have extra parameters (ex. rounding)
-      2. remove profit_quantity everywhere
-      3. remove target_quantity everywhere
-      4. consider how to make Interface compatible
-         with accessor generation (ex. getResource,
-         getQuantity, etc.)
-      5. consider creating an IPriceable interface
-         which is common to deliveries and amounts
-  """
-
-  # Core API
-  def getQuantity():
-    """
-      Returns the quantity of the resource
-      in the unit specified by the Amount
-    """
-
-  def getResource():
-    """
-      Returns the resource category relative URL
-      of the Amount
-    """
-
-  def getQuantityUnit():
-    """
-      Returns the quantity unit category relative URL
-      of the Amount
-    """
-
-  def isCancellationAmount():
-    """
-      A cancellation amount must be interpreted
-      reversely wrt. to the sign of quantity.
-
-      For example, a negative credit for a cancellation
-      amount is a negative credit, not a positive
-      debit.
-
-      A negative production quantity for a cancellation
-      amount is a cancelled production, not
-      a consumption
-    """
-
-  # Net Quantity API
-  def getEfficiency():
-    """
-      Returns the ratio of loss for the given amount. This
-      is only used in Path such as Transformation. In other
-      words, efficiency of movements is always 100%.
-    """
-
-  def getNetQuantity():
-    """
-      Returns the quantity multiplied by the ratio.
-    """
-
-  # Price API
-  def getPrice():
-    """
-      Returns the unit price of the resource
-    """
-  
-  def getTotalPrice():
-    """
-      Returns total price ie. the unit price of the resource
-      multiplied by the quantity.
-    """
-
-  # Conversion API
-  def getConvertedQuantity():
-    """
-      Returns the quantity of the resource converted in the
-      management unit of the resource
-    """
-
-  def getNetConvertedQuantity():
-    """
-      Returns the net quantity of the resource converted in the
-      management unit of the resource
-    """
-
-  # Make it possible to add amounts
-  def __add__(value):
-    """Add an amount to another amount
-
-      'value' is an IAmount document
-    """
-
-  def __sub__(value):
-    """Substract an amount from another amount
-
-      'value' is an IAmount document
-    """
-
-  def __mul__(value):
-    """Multiply an Amount by a float
-
-      'value' is a float
-    """
-
-  def __div__(value):
-    """Divide an Amount by a float
-
-      'value' is a float
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IArrow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IArrow.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IArrow.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IArrow.py (removed)
@@ -1,44 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 IArrow(Interface):
-  """The Arrow lists the methods which are available to 
-  access all source and destination categories of
-  a movement or of a delivery.
-  """
-  def getSourceArrowBaseCategoryList():
-    """Returns all categories which are used to define the source
-    of this Arrow
-    """
-
-  def getDestinationArrowBaseCategoryList():
-    """Returns all categories which are used to define the destination
-    of this Arrow
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IBusinessBuildable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IBusinessBuildable.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IBusinessBuildable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IBusinessBuildable.py (removed)
@@ -1,67 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 IBusinessBuildable(Interface):
-  """Business Buildable interface specification
-  """
-  def isBuildable(explanation):
-    """Returns True if any of the related Simulation Movement
-    is buildable and if the predecessor state is completed.
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def isPartiallyBuildable(explanation):
-    """Returns True if any of the related Simulation Movement
-    is buildable and if the predecessor state is partially completed.
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def isFrozen(explanation):
-    """Returns True if all related movements in the simulation
-    are frozen
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-
-    XXX - could be redundant with isBuildable
-    (isFrozen = not isBuildable ?)
-    """
-
-  def build(explanation):
-    """Builds all related movements in the simulation
-    using the builders of Business Path
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IBusinessCompletable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IBusinessCompletable.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IBusinessCompletable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IBusinessCompletable.py (removed)
@@ -1,71 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 IBusinessCompletable(Interface):
-  """Business Completable interface specification
-
-  Business states and path can be completed or partially completed.
-  """
-  def isCompleted(explanation):
-    """True if all related simulation movements for this explanation
-    document are delivered and in simulation state which is considered
-    as finished.
-    """
-
-  def isPartiallyCompleted(explanation):
-    """True if some related simulation movements for this explanation
-    document are delivered and in simulation state which is considered
-    as finished.
-    """
-
-  def getExpectedCompletionDate(task):
-    """Returns the date at which the given state is expected to
-    be completed, based on the start_date and stop_date of
-    the given task document.
-
-    'task' is a document which follows the ITaskGetter interface
-    (getStartDate, getStopDate)
-    """
-
-  def getExpectedCompletionDuration(task):
-    """Returns the duration  at which the the state
-    if expected to be completed, based on the start_date
-    and stop_date of the explanation document.
-
-    'task' is a document which follows the ITaskGetter interface
-    (getStartDate, getStopDate)
-    """
-
-  def getRemainingTradePhaseList(explanation, trade_phase_list=None):
-    """
-      Returns the list of remaining trade phase which to be done on the explanation.
-
-      trade_phase_list -- if provide, the result is filtered by it after collected
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IBusinessPath.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IBusinessPath.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IBusinessPath.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IBusinessPath.py (removed)
@@ -1,57 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Products.ERP5.Interface.IBusinessCompletable import IBusinessCompletable
-from Products.ERP5.Interface.IBusinessBuildable import IBusinessBuildable
-
-class IBusinessPath(IBusinessCompletable, IBusinessBuildable):
-  """Business Path interface specification
-  """
-  def getExpectedStartDate(task, predecessor_date=None):
-    """Returns the expected start date for this
-    path based on the task and provided predecessor_date.
-
-    'task' is a document which follows the ITaskGetter interface
-    (getStartDate, getStopDate) and defined the reference dates
-    for the business process execution
-
-    'predecessor_date' can be provided as predecessor date and
-     to override the date provided in the task
-    """
-
-  def getExpectedStopDate(task, predecessor_date=None):
-    """Returns the expected stop date for this
-    path based on the task and provided predecessor_date.
-
-    'task' is a document which follows the ITaskGetter interface
-    (getStartDate, getStopDate) and defined the reference dates
-    for the business process execution
-
-    'predecessor_date' can be provided as predecessor date and
-     to override the date provided in the task
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IBusinessProcess.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IBusinessProcess.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IBusinessProcess.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IBusinessProcess.py (removed)
@@ -1,87 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Products.ERP5.Interface.IBusinessCompletable import IBusinessCompletable
-from Products.ERP5.Interface.IBusinessBuildable import IBusinessBuildable
-
-class IBusinessProcess(IBusinessCompletable, IBusinessBuildable):
-  """Business Process interface specification
-  """
-  def getBuildablePathValueList(explanation):
-    """Returns the list of Business Path which are buildable
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getCompletedStateValueList(explanation):
-    """Returns the list of Business States which are completed
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getPartiallyCompletedStateValueList(explanation):
-    """Returns the list of Business States which are partially 
-    completed
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getLatestCompletedStateValue(explanation):
-    """Returns a completed Business State with no succeeding
-    completed Business Path
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getLatestPartiallyCompletedStateValue(explanation):
-    """Returns a partially completed Business State with no
-    succeeding partially completed Business Path
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getLatestCompletedStateValueList(explanation):
-    """Returns all completed Business State with no succeeding
-    completed Business Path
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """
-
-  def getLatestPartiallyCompletedStateValueList(explanation):
-    """Returns all partially completed Business State with no
-    succeeding partially completed Business Path
-
-    'explanation' is the Order or Item or Document which is the
-    cause of a root applied rule in the simulation
-    """

Removed: erp5/trunk/products/ERP5/interfaces/IBusinessState.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IBusinessState.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IBusinessState.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IBusinessState.py (removed)
@@ -1,33 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Products.ERP5.Interface.IBusinessCompletable import IBusinessCompletable
-
-class IBusinessState(IBusinessCompletable):
-  """Business State interface specification
-  """

Removed: erp5/trunk/products/ERP5/interfaces/IMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/IMovement.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/IMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/IMovement.py (removed)
@@ -1,163 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 IMovement(Interface):
-  """Movement interface specification
-
-  A movement represents an amount of resources which 
-  is moved along an Arrow (source and destination).
-
-  Equations:
-    Production/Consumption
-
-    (A -> B)
-      production_quantity means nothing
-      consumption_quantity means nothing
-
-    (A -> Nothing)
-    if quantity > 0
-      consumption_quantity = quantity
-      production_quantity = 0
-
-    if quantity < 0
-      consumption_quantity = 0
-      production_quantity = - quantity
-
-    (Nothing -> B)
-    if quantity > 0
-      consumption_quantity = 0
-      production_quantity = quantity
-
-    if quantity < 0
-      consumption_quantity = - quantity 
-      production_quantity = 0
-
-    Credit/Debit
-
-    if quantity > 0
-      source_credit = - quantity
-      source_debit = quantity
-      destination_credit = quantity
-      destination_debit = - quantity
-
-    if quantity < 0
-      source_credit = quantity
-      source_debit = - quantity
-      destination_credit = - quantity
-      destination_debit = quantity
-
-    TODO:
-      1. finish equations (for asset price)
-      2. clarify asset value application for multi
-         currency accunting
-      3. clarify the use of asset price in ERP5
-         (accounting and outside) since we no 
-         longer store asset price on non accounting
-         movements
-  """
-  # Helper API for Production
-  def getConsumptionQuantity():
-    """Returns the consumed quantity during
-    production
-    """
-
-  def getProductionQuantity():
-    """Returns the produced quantity during
-    production
-    """
-
-  # Helper methods for asset value calculation
-  def getSourceAssetPrice():
-    """Returns the asset price on the source, if defined
-    XXX - it is unclear if we still use this
-    """
-
-  def getDestinationAssetPrice():
-    """Returns the asset price on the destination, if defined
-    XXX - it is unclear if we still use this
-    """
-
-  def getSourceInventoriatedTotalAssetPrice():
-    """Returns the total asset price for the source, if defined
-    """
-
-  def getDestinationInventoriatedTotalAssetPrice():
-    """Returns the total asset price for the destination, if defined
-    """
-
-  # Helper methods for single currency Accounting (debit / credit)
-  def getSourceDebit():
-    """Returns the source debit in the transaction currency
-    """
-
-  def getSourceCredit():
-    """Returns the source credit in the transaction currency
-    """
-
-  def getDestinationDebit():
-    """Returns the destination debit in the transaction currency
-    """
-
-  def getDestinationCredit():
-    """Returns the destination credit in the transaction currency
-    """
-
-  # Helper methods for multi currency Accounting (debit / credit)
-  def getSourceAssetDebit():
-    """Returns the source debit in the source management currency
-    """
-
-  def getSourceAssetCredit():
-    """Returns the source credit in the source management currency
-    """
-
-  def getDestinationAssetDebit():
-    """Returns the destination debit in the destination management currency
-    """
-
-  def getDestinationAssetCredit():
-    """Returns the destination credit in the destination management currency
-    """
-
-  def getSourceInventoriatedTotalAssetDebit():
-    """Unclear - XXX
-    """
-
-  def getSourceInventoriatedTotalAssetCredit():
-    """Unclear - XXX
-    """
-
-  def getDestinationInventoriatedTotalAssetDebit():
-    """Unclear - XXX
-    """
-
-  def getDestinationInventoriatedTotalAssetCredit():
-    """Unclear - XXX
-    """

Removed: erp5/trunk/products/ERP5/interfaces/ISimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/ISimulationMovement.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/ISimulationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/ISimulationMovement.py (removed)
@@ -1,116 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 ISimulationMovement(Interface):
-  """Simulation Movement interface specification
-
-    The SimulationMovement interface introduces the option
-    to define quantity errors between the simulation
-    and the delivered reality.
-
-    In short: parent applied rules use the Movement
-    API to define quantity. Child applied rules
-    should use the Delivered API to access appropriate
-    quantity values which are take into account the
-    delivery_error.
-
-    DeliverySolver either solve divergence by
-    setting the delivery_error (then no target
-    solver needed, at least for quantity) or
-    by changing the quantity (then TargetSolver
-    is needed to backtrack the quantity).
-
-    Equation:
-      quantity(SM) + delivery_error (SM) =
-        quantity(DL) * delivery_ratio(SM)
- 
-    TODO:
-      1. unclear API remaining
- """
-
-  # Delivery API
-  def getDeliveryRatio():
-    """
-      Returns ratio to apply on the quantity
-      property of the corresponding delivery
-      to obtain the current quantity
-    """
-
-  def getDeliveryError():
-    """
-      Returns correction to make the match
-      between delivery quantity and simulation
-      quantity consistent
-    """
-
-  def getDeliveryQuantity():
-    """
-      Returns quantity which was actually shipped, taking
-      into account the errors of the simulation fixed by
-      the delivery
-
-      quantity + delivery_error
-    """
-
-  def getDeliveryConvertedQuantity():
-    """XXX - unclear
-    """
-
-  # Divergence API
-  def isConvergent():
-    """Tells whether the simulation movement is convergent
-      or not, with related delivery
-    """
-
-  def isDivergent():
-    """Tells whether the simulation movement is divergent
-      or not, with related delivery
-    """
-
-  def getDivergenceList():
-    """Returns a list of divergences 
-    XXX - unclear, please explan what the returned documents
-    or object are (type, class)
-    """
-
-  def isFrozen():
-    """Tells whether the simulation movement is frozen.
-    By default, looks up the related Business Process Path
-    and tells if the simulation state is part of completed
-    states.
-
-    XXX - should this be renamed isCompleted ? are the
-    notions of isFrozen and isCompleted same or different ?
-    """
-
-  def isSimulated():
-    """XXX - unclear
-    """
-

Removed: erp5/trunk/products/ERP5/interfaces/ITransformation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/ITransformation.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/ITransformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/ITransformation.py (removed)
@@ -1,69 +1,0 @@
-# -*- coding: utf8 -*-
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#                    Łukasz Nowak <luke at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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.
-#
-##############################################################################
-
-# simple interface which have to be implemented on TradeModelLine,
-# Transformation, Pay Sheet Model, etc
-from zope.interface import Interface
-class ITransformation(Interface):
-  """
-    Common Interface to implementing quering of Indirect Amount
-    Models (TaxModelLine, InvoiceModelLine) shall be based on this interface
-  """
-
-  def getAggregatedAmountList(context, **kw):
-    """Returns implementation specific AggregatedAmountList of amounts
-    generated by set of rules
-
-    context - represents object for which calculation shall happen
-
-    **kw - contains implementations specific parameters
-
-    The method returns an instance of AggregatedAmountList class defined
-    at ERP5/AggregatedAmountList.py
-
-    Note: This method shall be linear in case if context is order, line,
-    applied rule or movement. In case of built delivery this method shall
-    be wise enough to CORRECTLY un-linearise calculation, eg. tax is
-    time dependent, paysheet build from invoices.
-    """
-    pass
-
-  def updateAggregatedAmountList(context, **kw):
-    """Updates currently existing movements on delivery
-
-    context - represents object on which update shall happen
-
-    **kw - contains implementations specific parameters
-
-    The method return a dict of list of movements : 'movement_to_add_list' and
-    'movement_to_delete_list'.
-    """
-    pass
-

Removed: erp5/trunk/products/ERP5/interfaces/OpenOrderExpander.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/OpenOrderExpander.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/OpenOrderExpander.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/OpenOrderExpander.py (removed)
@@ -1,41 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class OpenOrderExpander(Interface):
-  """
-    Any class capable of expanding an Open Order Rule
-    follows the OpenOrderExpander interface
-  """
-
-  def expandOpenOrderRule(applied_rule_id=None, force=0, **kw):
-    """
-      This method is invoked by OpenOrderRule to delegate
-      the default implementation of expand
-    """

Removed: erp5/trunk/products/ERP5/interfaces/Predicate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/Predicate.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/Predicate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/Predicate.py (removed)
@@ -1,59 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class Predicate(Interface):
-  """
-    A Predicate allows to make a statement about a document.
-    A statement can be related to:
-
-    - the attributes of the document (ex. price >= 3.0)
-
-    - the categories of the document (ex. )
-
-    The Predicate class is an abstract class, which is
-    implemented by subclasses.
-  """
-
-  def test(context, tested_base_category_list=None):
-    """A Predicate can be tested on a given context.
-
-      Parameters can passed in order to ignore some conditions:
-      - tested_base_category_list:  this is the list of category that we do
-        want to test. For example, we might want to test only the
-        destination or the source of a predicate.
-    """
-
-  def asSQLExpression():
-    """
-      A Predicate can be rendered as an sql expression. This
-      can be useful to create reporting trees based on the
-      ZSQLCatalog
-    """
-

Removed: erp5/trunk/products/ERP5/interfaces/Rule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interface/Rule.py?rev=27231&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/Rule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/Rule.py (removed)
@@ -1,46 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
-#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability 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
-# 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 Interface import Interface
-
-class Rule(Interface):
-  """A Rule describes transformations of documents.
-  """
-
-  def constructNewAppliedRule(context):
-    """Create a new applied rule in the context.
-
-    An applied rule is an instanciation of a Rule. The applied rule is
-    linked to the Rule through the `specialise` relation.
-    """
-
-  def expand(applied_rule):
-    """Expand this applied rule to create new documents inside the
-    applied rule.
-    """
-

Copied: erp5/trunk/products/ERP5/interfaces/rule.py (from r27231, erp5/trunk/products/ERP5/Interface/Rule.py)
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/interfaces/rule.py?p2=erp5/trunk/products/ERP5/interfaces/rule.py&p1=erp5/trunk/products/ERP5/Interface/Rule.py&r1=27231&r2=27277&rev=27277&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Interface/Rule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/rule.py [utf8] Mon Jun  1 10:51:09 2009
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
+# Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved.
 #                    Jean-Paul Smets-Solanes <jp at nexedi.com>
 #
 # WARNING: This program as such is intended to be used by professional
@@ -37,10 +37,12 @@
 
     An applied rule is an instanciation of a Rule. The applied rule is
     linked to the Rule through the `specialise` relation.
+    XXX update params
     """
 
   def expand(applied_rule):
     """Expand this applied rule to create new documents inside the
     applied rule.
+    XXX update params
     """
 

Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=27277&r1=27276&r2=27277&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Mon Jun  1 10:51:09 2009
@@ -43,6 +43,8 @@
 
 from AccessControl import ModuleSecurityInfo
 from AccessControl.SecurityInfo import allow_class
+from AccessControl import getSecurityManager
+from AccessControl.SecurityManagement import newSecurityManager
 
 from Products.CMFCore import utils
 from Products.CMFCore.Expression import Expression
@@ -335,11 +337,11 @@
     this_module._dtmldir = os.path.join( product_path, 'dtml' )
 
     # Update PropertySheet Registry
-    for module_id in ('PropertySheet', 'Interface', 'Constraint', ):
+    for module_id in ('PropertySheet', 'interfaces', 'Constraint', ):
       path, module_id_list = getModuleIdList(product_path, module_id)
       if module_id == 'PropertySheet':
         import_method = importLocalPropertySheet
-      elif module_id == 'Interface':
+      elif module_id == 'interfaces':
         import_method = importLocalInterface
       elif module_id == 'Constraint':
         import_method = importLocalConstraint
@@ -521,16 +523,17 @@
   for bc in category_list :
     base_category_dict[bc] = 1
 
-def importLocalInterface(class_id, path = None):
+def importLocalInterface(module_id, path = None):
   import Products.ERP5Type.Interface
   if path is None:
     instance_home = getConfiguration().instancehome
-    path = os.path.join(instance_home, "Interface")
-  path = os.path.join(path, "%s.py" % class_id)
+    path = os.path.join(instance_home, "interfaces")
+  path = os.path.join(path, "%s.py" % module_id)
   f = open(path)
   try:
     module = imp.load_source(class_id, path, f)
-    setattr(Products.ERP5Type.Interface, class_id, getattr(module, class_id))
+    class_id = "I" + convertToUpperCase(module_id)
+    setattr(Products.ERP5Type.interfaces, class_id, getattr(module, class_id))
   finally:
     f.close()
 
@@ -1976,9 +1979,10 @@
     property_holder.registerAccessor(accessor_name, id, Category.DefaultGetter, ())
 
   accessor_name = 'has' + UpperCase(id)
-  if not hasattr(property_holder, accessor_name):
-    property_holder.registerAccessor(accessor_name, id, Category.Tester, ())
-    property_holder.declareProtected(read_permission, accessor_name)
+  if not hasattr(BaseClass, accessor_name):
+    tester = Category.Tester(accessor_name, id) # All testers should be created at once at startup
+    setattr(BaseClass, accessor_name, tester)
+    BaseClass.security.declareProtected(read_permission, accessor_name)
 
   setter_name = 'set' + UpperCase(id)
   if not hasattr(property_holder, setter_name):




More information about the Erp5-report mailing list