[Erp5-report] r14846 - /erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 18 14:01:49 CEST 2007


Author: vincent
Date: Mon Jun 18 14:01:48 2007
New Revision: 14846

URL: http://svn.erp5.org?rev=14846&view=rev
Log:
Handle "former" coin status.
Never define a variation on coins.

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=14846&r1=14845&r2=14846&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/BaobabConduit.py Mon Jun 18 14:01:48 2007
@@ -524,6 +524,11 @@
            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.
+            continue
           line_currency_cash = currency_cash
           break
       # no currency found
@@ -560,7 +565,8 @@
           if base_key == 'status_code':
             category = self.status_code_to_cash_status[kw[base_key]]
           elif base_key == 'variation':
-            category = self.variation_translate_dict.get(kw[base_key], kw[base_key])
+            if currency_portal_type == 'Banknote': # Variation is set only for Banknotes.
+              category = self.variation_translate_dict.get(kw[base_key], kw[base_key])
           else:
             category = kw[base_key]
         else:




More information about the Erp5-report mailing list