Commit 1e1c99b9 authored by Łukasz Nowak's avatar Łukasz Nowak

- move matching_property from BPMRule to Rule property sheet

 - use rule property sheet in BPMRule instead of applied rule
 - remove not needed inheritance simulation for property_sheets property


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28466 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a590a513
##############################################################################
#
# 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.
#
##############################################################################
class BPMRule:
"""
BPM extended Rule properties
"""
_properties = (
{ 'id' : 'matching_property',
'description' : 'List of properties used in to compare previsions '
'with Simulation Movements',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
)
_categories = ('trade_phase', )
......@@ -44,8 +44,6 @@ class BPMDeliveryRule(BPMRule):
meta_type = 'ERP5 BPM Delivery Rule'
portal_type = 'BPM Delivery Rule'
property_sheets = BPMRule.property_sheets
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -44,8 +44,6 @@ class BPMInvoiceTransactionRule(BPMRule, PredicateMatrix):
meta_type = 'ERP5 BPM Invoice Transaction Rule'
portal_type = 'BPM Invoice Transaction Rule'
property_sheets = BPMRule.property_sheets
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -45,8 +45,6 @@ class BPMInvoicingRule(BPMRule):
meta_type = 'ERP5 BPM Invoicing Rule'
portal_type = 'BPM Invoicing Rule'
property_sheets = BPMRule.property_sheets
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -43,8 +43,6 @@ class BPMOrderRule(BPMDeliveryRule):
meta_type = 'ERP5 BPM Order Rule'
portal_type = 'BPM Order Rule'
property_sheets = BPMDeliveryRule.property_sheets
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -72,7 +72,7 @@ class BPMRule(Predicate, XMLObject):
, PropertySheet.Predicate
, PropertySheet.Reference
, PropertySheet.Version
, PropertySheet.AppliedRule
, PropertySheet.Rule
)
movement_type = 'Simulation Movement'
......
......@@ -29,8 +29,14 @@ class Rule:
"""
Property sheet for Rule class and subclass instances
"""
_properties = (
{ 'id' : 'matching_property',
'description' : 'List of properties used in to compare previsions '
'with Simulation Movements',
'type' : 'lines',
'default' : [],
'multivalued' : 1,
'mode' : 'w' },
{ 'id' : 'expandable_property',
'description' : 'List of properties used in expand',
'type' : 'lines',
......@@ -38,3 +44,5 @@ class Rule:
'multivalued' : 1,
'mode' : 'w' },
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment