From 27070c7e6249b5c74f838828d498b9a0a8807a12 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 8 Jan 2007 15:53:31 +0000 Subject: [PATCH] keep script_id parameter compatibility in _getTypeBaseMethod git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11937 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Base.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 5bdf670766..1b7a7152ad 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -2184,11 +2184,24 @@ class Base( CopyContainer, # Type Casting security.declarePrivate( '_getTypeBasedMethod' ) - def _getTypeBasedMethod(self, method_id, fallback_script_id=None): + def _getTypeBasedMethod(self, method_id, fallback_script_id=None, + script_id=None,**kw): """ - Looks up for + Looks up for a zodb script wich ends with what is given as method_id + and starts with the name of the portal type or meta type. + + For example, method_id can be "asPredicate" and we will on a sale + packing list line: + SalePackingListLine_asPredicate + DeliveryLine_asPredicate + + fallback_script_id : the script to use if nothing is found """ - # Look at local and acquired categories and make it criterion membership + # script_id should not be used any more, keep compatibility + if script_id is not None: + LOG('ERP5Type/Base.getTypeBaseMethod',0, + 'DEPRECATED script_id parameter is used') + fallback_script_id=script_id script_name = '' script = None script_name_end = '_%s' % method_id -- 2.30.9