diff --git a/product/ERP5/Document/Movement.py b/product/ERP5/Document/Movement.py index a99cd137fb009a29541a73ec87361afefa913283..45d9a0f5e94f4d203cdc61b0430f74f9c7b43e85 100644 --- a/product/ERP5/Document/Movement.py +++ b/product/ERP5/Document/Movement.py @@ -212,7 +212,7 @@ class Movement(XMLObject, Amount): return default security.declareProtected(Permissions.AccessContentsInformation, 'getPrice') - def getPrice(self, default=None, context=None, REQUEST=None, **kw): + def getPrice(self, default=None, **kw): """ Get the Price in the context. @@ -234,11 +234,14 @@ class Movement(XMLObject, Amount): context = default default = None + if len(kw): + warn('Passing keyword arguments to Movement.getPrice has no effect', + DeprecationWarning) + local_price = self._baseGetPrice() if local_price is None: # We must find a price for this movement - local_price = self._getPrice(context=self.asContext( - context=context, REQUEST=REQUEST, **kw)) + local_price = self._getPrice(context=self) # And store it localy if local_price is not None: self.setPrice(local_price)