Commit d1d0a001 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add asComposedDocument.getProperty().

that tries to get the property from the original and its effecive models.
parent 387360da
......@@ -36,6 +36,7 @@ from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.BusinessProcess import BusinessProcess
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
_MARKER = []
@transactional_cached()
def _getEffectiveModel(self, start_date, stop_date):
......@@ -170,6 +171,13 @@ class asComposedDocument(object):
object_list)
return sortValueList(object_list, sort_on, sort_order, **kw)
def getProperty(self, key, d=_MARKER, **kw):
for obj in [self._original] + self._effective_model_list:
r = obj.getProperty(key, _MARKER, **kw)
if r is not _MARKER:
return r
if d is not _MARKER:
return d
class CompositionMixin:
"""
......
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