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