Commit 80ccb798 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Non-unique per account check references are unique per country.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41947 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c33aad05
...@@ -144,8 +144,13 @@ def checkReferenceListUniqueness(reference_list, model_uid, destination_payment_ ...@@ -144,8 +144,13 @@ def checkReferenceListUniqueness(reference_list, model_uid, destination_payment_
else:\n else:\n
destination_payment_uid = destination_payment_value.getUid()\n destination_payment_uid = destination_payment_value.getUid()\n
internal_bank_account_number = destination_payment_value.getInternalBankAccountNumber()\n internal_bank_account_number = destination_payment_value.getInternalBankAccountNumber()\n
# unique_per_account is True -> references are unique per account\n
# unique_per_account is False -> references are unique per country\n
if unique_per_account:\n if unique_per_account:\n
catalog_kw[\'destination_payment_uid\'] = destination_payment_uid\n catalog_kw[\'destination_payment_uid\'] = destination_payment_uid\n
else:\n
reference_match = "%s%%" % (destination_payment_value.getReference()[:2], )\n
catalog_kw[\'baobab_destination_payment_reference\'] = reference_match\n
match_list = portal.portal_catalog(**catalog_kw)\n match_list = portal.portal_catalog(**catalog_kw)\n
assertReferenceMatchListEmpty(match_list, internal_bank_account_number)\n assertReferenceMatchListEmpty(match_list, internal_bank_account_number)\n
for reference in reference_list:\n for reference in reference_list:\n
......
baobab_destination_payment_reference | category,catalog/reference/z_related_destination_payment
\ No newline at end of file
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