[Erp5-report] r17962 - /erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Dec 3 16:26:37 CET 2007
Author: seb
Date: Mon Dec 3 16:26:36 2007
New Revision: 17962
URL: http://svn.erp5.org?rev=17962&view=rev
Log:
the gid generator has moved from the configuration of the subscription to the conduit itself
Modified:
erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py
Modified: erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py?rev=17962&r1=17961&r2=17962&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py Mon Dec 3 16:26:36 2007
@@ -1075,3 +1075,26 @@
"""
ERP5Conduit.newObject(self, object=object, xml=xml, simulate=simulate,
reset_local_roles=reset_local_roles, reset_workflow=reset_workflow)
+
+ def getGidFromObject(self, object):
+ """
+ return the Gid composed with the object informations
+ """
+ script = None
+ parent = object.aq_parent
+ while not (parent.id.endswith('_xml') or (parent.id.endswith('_module'))):
+ parent = parent.aq_parent
+ if parent.id == 'bank_account_inventory_xml':
+ script = getattr(object, 'BankAccountInventory_getMasterGid')
+ elif parent.id == 'customers_xml':
+ script = getattr(object, 'Oracle_getGid')
+ elif parent.id == 'cash_inventory_xml':
+ script = getattr(object, 'Inventory_getMasterGid')
+ elif object.getPortalType() == 'Bank Account Inventory Group':
+ script = getattr(object, 'BankAccountInventory_getGid')
+ elif object.getPortalType() == 'Cash Inventory Group':
+ script = getattr(object, 'Inventory_getClientGid')
+ else:
+ script = getattr(object, 'Baobab_getGid')
+ return script()
+
More information about the Erp5-report
mailing list