diff --git a/product/ERP5/Document/Movement.py b/product/ERP5/Document/Movement.py index 3767f8adca86cbed1e729d5679bedb7b845e952a..c3210edfe8a0243f9789ae9b0c310b3703720b40 100644 --- a/product/ERP5/Document/Movement.py +++ b/product/ERP5/Document/Movement.py @@ -38,6 +38,7 @@ from Products.ERP5Type.Base import Base from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.TransactionalVariable import getTransactionalVariable +from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply from Products.ERP5.mixin.amount_generator import AmountGeneratorMixin from Products.ERP5.mixin.composition import CompositionMixin from Products.ERP5.Document.Amount import Amount @@ -272,7 +273,7 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): # not searched. method = getattr(context, 'Movement_getPriceCalculationOperandDict', None) if method is not None: - operand_dict = method(**kw) + operand_dict = unrestricted_apply(method, kw=kw) if operand_dict is None: return default assert 'price' in operand_dict diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index 763611339526f7d406a287624c92db89f598ddeb..babb12acd2de5dfbcdc8bed918701c4668ed46b2 100644 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -37,6 +37,7 @@ from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type.XMLMatrix import XMLMatrix from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.Base import Base +from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply from Products.ERP5Type.Utils import cartesianProduct from Products.ERP5.mixin.variated import VariatedMixin @@ -747,7 +748,8 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin): # (i.e. a movement). method = self._getTypeBasedMethod('getPriceCalculationOperandDict') if method is not None: - return method(default=default, movement=context, REQUEST=REQUEST, **kw) + return unrestricted_apply(method, kw=dict( + default=default, movement=context, REQUEST=REQUEST, **kw)) # Next, try an old type-based method which returns only a final result. method = self._getTypeBasedMethod('getPrice')