Commit 93186e93 authored by Vincent Pelletier's avatar Vincent Pelletier

Handle "former" coin status.

Never define a variation on coins.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14846 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 004b7769
...@@ -524,6 +524,11 @@ class BaobabConduit(ERP5Conduit): ...@@ -524,6 +524,11 @@ class BaobabConduit(ERP5Conduit):
currency_name not in (None, '') and \ currency_name not in (None, '') and \
currency_cash.getBasePrice() == base_price and \ currency_cash.getBasePrice() == base_price and \
currency_cash.getPriceCurrencyId() == currency_name: 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 line_currency_cash = currency_cash
break break
# no currency found # no currency found
...@@ -560,7 +565,8 @@ class BaobabConduit(ERP5Conduit): ...@@ -560,7 +565,8 @@ class BaobabConduit(ERP5Conduit):
if base_key == 'status_code': if base_key == 'status_code':
category = self.status_code_to_cash_status[kw[base_key]] category = self.status_code_to_cash_status[kw[base_key]]
elif base_key == 'variation': 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: else:
category = kw[base_key] category = kw[base_key]
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment