Commit 8c1669e6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint bad-indentation warnings.

parent 232d4b45
......@@ -33,39 +33,39 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Path import Path
class Supply(Path, XMLObject):
"""A Supply defines precise pricing and shipping conditions between
two trade parties for a limited selection of traded products,
components, services, etc. It can be used to represent price
catalogs, product referencing, pricing policy, etc.
"""
# CMF Type Definition
meta_type = 'ERP5 Supply'
portal_type = 'Supply'
"""A Supply defines precise pricing and shipping conditions between
two trade parties for a limited selection of traded products,
components, services, etc. It can be used to represent price
catalogs, product referencing, pricing policy, etc.
"""
# CMF Type Definition
meta_type = 'ERP5 Supply'
portal_type = 'Supply'
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Price
, PropertySheet.Movement
, PropertySheet.Delivery
, PropertySheet.Path
, PropertySheet.FlowCapacity
, PropertySheet.Comment
)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Price
, PropertySheet.Movement
, PropertySheet.Delivery
, PropertySheet.Path
, PropertySheet.FlowCapacity
, PropertySheet.Comment
)
#######################################################
# Defer indexing process
def reindexObject(self, *k, **kw):
"""
Reindex children, as editing properties on Supply need
to be propagated into predicate table for Supply Line
"""
self.recursiveReindexObject(*k, **kw)
#######################################################
# Defer indexing process
def reindexObject(self, *k, **kw):
"""
Reindex children, as editing properties on Supply need
to be propagated into predicate table for Supply Line
"""
self.recursiveReindexObject(*k, **kw)
......@@ -78,7 +78,7 @@ def _getEffectiveModel(self, start_date, stop_date):
sort_on=(('version', 'descending'),))
if not model_list:
if self.getValidationState() == 'invalidated':
return self
return self
raise KeyError('No %s found with the reference %s between %s and %s' % \
(self.getPortalType(), reference, start_date, stop_date))
return model_list[0].getObject()
......
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