[Erp5-report] r28462 - in /erp5/trunk/products/ERP5: Document/ PropertySheet/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 19 14:12:10 CEST 2009
Author: luke
Date: Wed Aug 19 14:12:06 2009
New Revision: 28462
URL: http://svn.erp5.org?rev=28462&view=rev
Log:
- create PropertySheet for Rule classes
- move expandable_property from AppliedRule to Rule property sheet
- associate Rule (*not* AppliedRule) property sheet with Rule document
- as Zope uses magic to fill automatically property_sheets list there is not need to repeat it in subclasses
Added:
erp5/trunk/products/ERP5/PropertySheet/Rule.py
Modified:
erp5/trunk/products/ERP5/Document/AmortisationRule.py
erp5/trunk/products/ERP5/Document/DeliveryRule.py
erp5/trunk/products/ERP5/Document/InvoiceRule.py
erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py
erp5/trunk/products/ERP5/Document/InvoicingRule.py
erp5/trunk/products/ERP5/Document/OpenOrderRule.py
erp5/trunk/products/ERP5/Document/OrderRule.py
erp5/trunk/products/ERP5/Document/PaymentRule.py
erp5/trunk/products/ERP5/Document/ProductionOrderModelRule.py
erp5/trunk/products/ERP5/Document/ProductionOrderRule.py
erp5/trunk/products/ERP5/Document/Rule.py
erp5/trunk/products/ERP5/Document/TaxRule.py
erp5/trunk/products/ERP5/Document/TradeModelRule.py
erp5/trunk/products/ERP5/Document/TransformationModelRule.py
erp5/trunk/products/ERP5/Document/TransformationRule.py
erp5/trunk/products/ERP5/Document/TransformationSourcingModelRule.py
erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py
erp5/trunk/products/ERP5/PropertySheet/AppliedRule.py
Modified: erp5/trunk/products/ERP5/Document/AmortisationRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/AmortisationRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/AmortisationRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/AmortisationRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -56,14 +56,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
movement_name_dict = { 'immobilisation': { 'immo': 'start_immo',
'amo': 'start_amo',
@@ -125,8 +117,6 @@
setter = getattr(simulation_movement, setter_name)
setter(value)
simulation_movement.edit(start_date=simulation_movement.getStopDate())
- if set_ratio:
- simulation_movement.setDefaultDeliveryProperties()
#simulation_movement.immediateReindexObject()
return modified_properties
Modified: erp5/trunk/products/ERP5/Document/DeliveryRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -47,14 +47,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
# Simulation workflow
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
Modified: erp5/trunk/products/ERP5/Document/InvoiceRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoiceRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoiceRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/InvoiceRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -51,14 +51,6 @@
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
-
security.declareProtected(Permissions.AccessContentsInformation,
'isAccountable')
def isAccountable(self, movement):
Modified: erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -52,14 +52,6 @@
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
-
#### Helper method for expand
def _generatePrevisionList(self, applied_rule, **kw):
"""
Modified: erp5/trunk/products/ERP5/Document/InvoicingRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoicingRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoicingRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/InvoicingRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -48,14 +48,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
security.declareProtected(Permissions.AccessContentsInformation,
'isAccountable')
Modified: erp5/trunk/products/ERP5/Document/OpenOrderRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/OpenOrderRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/OpenOrderRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/OpenOrderRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -46,15 +46,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
# Simulation workflow
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
Modified: erp5/trunk/products/ERP5/Document/OrderRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/OrderRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/OrderRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/OrderRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -47,15 +47,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- , PropertySheet.AppliedRule
- )
# Simulation workflow
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
Modified: erp5/trunk/products/ERP5/Document/PaymentRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PaymentRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PaymentRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PaymentRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -50,14 +50,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
receivable_account_type_list = ('asset/receivable', )
payable_account_type_list = ('liability/payable', )
Modified: erp5/trunk/products/ERP5/Document/ProductionOrderModelRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ProductionOrderModelRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ProductionOrderModelRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/ProductionOrderModelRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -51,15 +51,6 @@
__implements = ( interfaces.IPredicate,
interfaces.IRule )
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- , PropertySheet.AppliedRule
- )
-
# Simulation workflow
security.declareProtected(Permissions.AccessContentsInformation,
'_getExpandablePropertyDict')
Modified: erp5/trunk/products/ERP5/Document/ProductionOrderRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ProductionOrderRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ProductionOrderRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/ProductionOrderRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -51,15 +51,6 @@
__implements = ( interfaces.IPredicate,
interfaces.IRule )
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- , PropertySheet.AppliedRule
- )
# Simulation workflow
security.declareProtected(Permissions.AccessContentsInformation,
Modified: erp5/trunk/products/ERP5/Document/Rule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Rule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Rule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Rule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -86,6 +86,7 @@
, PropertySheet.Predicate
, PropertySheet.Reference
, PropertySheet.Version
+ , PropertySheet.Rule
)
# Portal Type of created children
Modified: erp5/trunk/products/ERP5/Document/TaxRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TaxRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TaxRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TaxRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -42,14 +42,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
def expand(self, applied_rule, force=0, **kw):
Modified: erp5/trunk/products/ERP5/Document/TradeModelRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -47,15 +47,6 @@
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- , PropertySheet.AppliedRule
- )
def _getMovementDictByBusinessPath(self, movement, business_path_list):
"""Sets Business Path's provided values"""
Modified: erp5/trunk/products/ERP5/Document/TransformationModelRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationModelRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationModelRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformationModelRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -220,13 +220,6 @@
zope.interface.implements(interfaces.IPredicate,
interfaces.IRule )
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
def getFactory(self):
return TransformationModelMovementFactory()
Modified: erp5/trunk/products/ERP5/Document/TransformationRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformationRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -53,13 +53,7 @@
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.IPredicate,
interfaces.IRule )
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
+
# Class variable
simulation_movement_portal_type = "Simulation Movement"
Modified: erp5/trunk/products/ERP5/Document/TransformationSourcingModelRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationSourcingModelRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationSourcingModelRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformationSourcingModelRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -63,13 +63,7 @@
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.IPredicate,
interfaces.IRule )
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
+
def getFactory(self):
return SourcingMovementFactory()
Modified: erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformationSourcingRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -142,13 +142,7 @@
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.IPredicate,
interfaces.IRule )
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
- , PropertySheet.Task
- )
+
# Class variable
simulation_movement_portal_type = "Simulation Movement"
Modified: erp5/trunk/products/ERP5/PropertySheet/AppliedRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/AppliedRule.py?rev=28462&r1=28461&r2=28462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/AppliedRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/PropertySheet/AppliedRule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -50,12 +50,6 @@
'type' : 'string',
'mode' : 'w' },
- { 'id' : 'expandable_property',
- 'description' : 'List of properties used in expand',
- 'type' : 'lines',
- 'default' : [],
- 'multivalued' : 1,
- 'mode' : 'w' },
)
_categories = ('specialise', 'causality', 'order', )
Added: erp5/trunk/products/ERP5/PropertySheet/Rule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/Rule.py?rev=28462&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/Rule.py (added)
+++ erp5/trunk/products/ERP5/PropertySheet/Rule.py [utf8] Wed Aug 19 14:12:06 2009
@@ -1,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
+#
+# 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.
+#
+##############################################################################
+
+class Rule:
+ """
+ Property sheet for Rule class and subclass instances
+ """
+
+ _properties = (
+ { 'id' : 'expandable_property',
+ 'description' : 'List of properties used in expand',
+ 'type' : 'lines',
+ 'default' : [],
+ 'multivalued' : 1,
+ 'mode' : 'w' },
+ )
More information about the Erp5-report
mailing list