• Jérome Perrin's avatar
    ERP5: fix content_type property · 5d5e0c49
    Jérome Perrin authored
    content_type is a bit special, because CMF's PortalFolderBase also have
    a content_type method, so this was confusing ERP5Type dynamic properties
    system. When the property was never set, the default value was the
    method acquired from PortalFolderBase.
    
    Fixes this by defining conten_type class attribute where needed.
    
    This also fixes an old expected failure test, it's now possible to use
    edit(content_type=something) in document without content type property
    set. It works now, but thanks to what seems to be outdated code in
    _valid_property_id from product/ERP5Type/patches/PropertyManager.py,
    because we have stopped setting all properties to None in Base years
    ago. For now, this works, but because of an outdated condition in
    _valid_property_id. We may revisit later in the future.
    5d5e0c49
testERP5Base.py 74.7 KB