Commit d5fdd550 authored by Julien Muchembled's avatar Julien Muchembled

fixup! New portal type: External Method

This fixes commit ea53f23e:

  ERROR Application Couldn't install ERP5Type
  Traceback (most recent call last):
    File "OFS/Application.py", line 691, in install_product
      initmethod(context)
    File "Products/ERP5Type/__init__.py", line 141, in initialize
      initializeProductDocumentRegistry()
    File "Products/ERP5Type/InitGenerator.py", line 62, in initializeProductDocumentRegistry
      importLocalDocument(class_id, class_path=class_path)
    File "Products/ERP5Type/Utils.py", line 994, in importLocalDocument
      module = __import__(module_path, {}, {}, (module_path,))
    File "Products/ERP5/Document/ExternalMethod.py", line 38, in <module>
      class ExternalMethod(XMLObject, ZopeExternalMethod, ExpressionMixin):
  TypeError: Error when calling the metaclass bases
      metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

What happened is that the API of ExpressionMixin changed in commit
df85ef46 and the backward compatibility
code (product/ERP5/mixin/expression.py) was broken.
parent ea53f23e
Pipeline #17864 failed with stage
in 0 seconds
......@@ -6492,7 +6492,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
seen_cls_set.add(cls)
_migrate_exception_set = set([
_migrate_exception_set = {
## Bootstrap
'Products.ERP5.ERP5Defaults',
'Products.ERP5Type.mixin.response_header_generator',
......@@ -6518,7 +6518,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5Type.interfaces.action',
'Products.ERP5Type.interfaces.action_container',
'Products.ERP5Type.ERP5Type',
'Products.ERP5.mixin.expression',
'Products.ERP5.Document.SQLMethod',
'Products.ERP5Type.Globals',
'Products.ERP5Type.TransactionalVariable',
......@@ -6773,7 +6772,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
'Products.ERP5OOo.tests.testFormPrintoutAsODT',
'Products.ERP5OOo.tests.testIngestion',
'Products.ERP5OOo.tests.testOOoDynamicStyle',
])
}
security.declareProtected(Permissions.ManagePortal,
'getMigratableSourceCodeFromFilesystemList')
......
......@@ -32,10 +32,10 @@ from Products.ExternalMethod.ExternalMethod import \
ExternalMethod as ZopeExternalMethod
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.mixin.expression import ExpressionMixin
from Products.ERP5Type.mixin.expression import ExpressionMixin
class ExternalMethod(XMLObject, ZopeExternalMethod, ExpressionMixin):
class ExternalMethod(XMLObject, ZopeExternalMethod, ExpressionMixin()):
""" External Method for ERP5
"""
......
# -*- coding: utf-8 -*-
# For backward compatibility only
from Products.ERP5Type.mixin.expression import ExpressionMixin
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