Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
fe5e050b
Commit
fe5e050b
authored
Nov 22, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Dec 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Business Manger: Changes in Dynamic classes
parent
3e381243
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+5
-2
product/ERP5Type/dynamic/portal_type_class.py
product/ERP5Type/dynamic/portal_type_class.py
+3
-1
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
fe5e050b
...
@@ -11,6 +11,7 @@ from Products.ERP5Type.Base import PropertyHolder, initializePortalTypeDynamicWo
...
@@ -11,6 +11,7 @@ from Products.ERP5Type.Base import PropertyHolder, initializePortalTypeDynamicWo
from
Products.ERP5Type.Utils
import
UpperCase
from
Products.ERP5Type.Utils
import
UpperCase
from
Products.ERP5Type.Core.CategoryProperty
import
CategoryProperty
from
Products.ERP5Type.Core.CategoryProperty
import
CategoryProperty
from
ExtensionClass
import
ExtensionClass
,
pmc_init_of
from
ExtensionClass
import
ExtensionClass
,
pmc_init_of
from
Products.ERP5Type.Core.Folder
import
Folder
from
zope.interface
import
classImplements
from
zope.interface
import
classImplements
from
ZODB.broken
import
Broken
,
PersistentBroken
from
ZODB.broken
import
Broken
,
PersistentBroken
...
@@ -333,7 +334,6 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -333,7 +334,6 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
# Do not load the class again if it has already been loaded
# Do not load the class again if it has already been loaded
if
not
cls
.
__isghost__
:
if
not
cls
.
__isghost__
:
return
return
# cls might be a subclass of a portal type class
# cls might be a subclass of a portal type class
# we need to find the right class to change
# we need to find the right class to change
for
klass
in
cls
.
__mro__
:
for
klass
in
cls
.
__mro__
:
...
@@ -354,7 +354,10 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -354,7 +354,10 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"Could not access Portal Type Object for type %r"
"Could not access Portal Type Object for type %r"
%
portal_type
,
error
=
sys
.
exc_info
())
%
portal_type
,
error
=
sys
.
exc_info
())
base_tuple
=
(
ERP5BaseBroken
,
)
# XXX: Add checks for testing if this is just during import and that too
# for module objects only, for other cases, the base_tuple should be
# ERP5Broken only in general
base_tuple
=
(
Folder
,)
portal_type_category_list
=
[]
portal_type_category_list
=
[]
attribute_dict
=
dict
(
_categories
=
[],
constraints
=
[])
attribute_dict
=
dict
(
_categories
=
[],
constraints
=
[])
interface_list
=
[]
interface_list
=
[]
...
...
product/ERP5Type/dynamic/portal_type_class.py
View file @
fe5e050b
...
@@ -296,9 +296,11 @@ def synchronizeDynamicModules(context, force=False):
...
@@ -296,9 +296,11 @@ def synchronizeDynamicModules(context, force=False):
the classes since the last reset on this node.
the classes since the last reset on this node.
* with force=True, forcefully reset the classes on the current node
* with force=True, forcefully reset the classes on the current node
and send out an invalidation to other nodes
and send out an invalidation to other nodes
XXX: force=True doesn't reset or migrate as migration still is dependent
on `_bootstrapped` which already do have portal_id
"""
"""
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
global
last_sync
global
last_sync
if
force
:
if
force
:
# hard invalidation to force sync between nodes
# hard invalidation to force sync between nodes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment