[Erp5-report] r15285 - /erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 24 10:03:32 CEST 2007
Author: vincent
Date: Tue Jul 24 10:03:31 2007
New Revision: 15285
URL: http://svn.erp5.org?rev=15285&view=rev
Log:
Externalize definition of former_coin_variation_list.
Check thet getFormer matches requirement, to avoid the case where a former coin would match in a current coin search.
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=15285&r1=15284&r2=15285&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py Tue Jul 24 10:03:31 2007
@@ -200,11 +200,13 @@
from Products.Baobab.Conduit import vault_code_to_path
from Products.Baobab.Conduit import variation_translate_dict
from Products.Baobab.Conduit import status_code_to_cash_status
+ from Products.Baobab.Conduit import former_coin_variation_list
except ImportError:
inventory_code_to_path = {}
vault_code_to_path = {}
ariation_translate_dict = {}
status_code_to_cash_status = {}
+ former_coin_variation_list = []
"""
Methods below are tools to use the property_map.
@@ -540,10 +542,10 @@
currency_name not in (None, '') and \
currency_cash.getBasePrice() == base_price and \
currency_cash.getPriceCurrencyId() == currency_name:
- if currency_portal_type == 'Coin' and kw.get('variation', None) == 'ANC' and \
- not currency_cash.getFormer():
- # If we are searching for an 'ANC' variation of a coin, getFormer
- # must be true for the currency cash to match.
+ # getFormer value must match searched coin variation.
+ if currency_portal_type == 'Coin' and \
+ (kw.get('variation', None) in former_coin_variation_list) != \
+ bool(currency_cash.getFormer()):
continue
line_currency_cash = currency_cash
break
More information about the Erp5-report
mailing list