Commit 85598a7b authored by Romain Courteaud's avatar Romain Courteaud

Restore hasCellRange old implementation, because DeliveryLine can be a

movement when it does not content any cell and matrix cell range is
not empty.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3095 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d204aca
...@@ -148,16 +148,19 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated): ...@@ -148,16 +148,19 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated):
""" """
This method can be overriden This method can be overriden
""" """
# Do not use XMLMatrix.hasCellContent, because it can generate # DeliveryLine can be a movement when it does not content any cell and
# inconsistency in catalog # matrix cell range is not empty.
# Exemple: define a line and set the matrix cell range, but do not create return XMLMatrix.hasCellContent(self, base_id=base_id)
# cell. # # Do not use XMLMatrix.hasCellContent, because it can generate
# Line was in this case consider like a movement, and was catalogued. # # inconsistency in catalog
# But, getVariationText of the line was not empty. # # Exemple: define a line and set the matrix cell range, but do not create
# So, in ZODB, resource as without variation, but in catalog, this was # # cell.
# the contrary... # # Line was in this case consider like a movement, and was catalogued.
cell_range = XMLMatrix.getCellRange(self, base_id=base_id) # # But, getVariationText of the line was not empty.
return (cell_range is not None and len(cell_range) > 0) # # So, in ZODB, resource as without variation, but in catalog, this was
# # the contrary...
# cell_range = XMLMatrix.getCellRange(self, base_id=base_id)
# return (cell_range is not None and len(cell_range) > 0)
security.declareProtected( Permissions.AccessContentsInformation, 'getCellValueList' ) security.declareProtected( Permissions.AccessContentsInformation, 'getCellValueList' )
def getCellValueList(self, base_id='movement'): def getCellValueList(self, base_id='movement'):
......
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