Commit 4295e447 authored by Sebastien Robin's avatar Sebastien Robin

setattr on propertysheets a bit differently so that we do not have errors with products CMFActivity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1962 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b64bbd3
......@@ -322,14 +322,15 @@ def writeLocalPropertySheet(class_id, text, create=1):
f.write(text)
def importLocalPropertySheet(class_id, path = None):
import Products.ERP5Type.PropertySheet
from Products.ERP5Type import PropertySheet
if path is None:
instance_home = getConfiguration().instancehome
path = os.path.join(instance_home, "PropertySheet")
path = os.path.join(path, "%s.py" % class_id)
f = open(path)
module = imp.load_source(class_id, path, f)
setattr(Products.ERP5Type.PropertySheet, class_id, getattr(module, class_id))
setattr(PropertySheet, class_id, getattr(module, class_id))
#setattr(Products.ERP5Type.PropertySheet, class_id, getattr(module, class_id))
# Register base categories
registerBaseCategories(getattr(module, class_id))
......
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