Commit 884c1954 authored by Vincent Pelletier's avatar Vincent Pelletier

Resource_uid does not work like resource_relative_url: as it exists in tables...

Resource_uid does not work like resource_relative_url: as it exists in tables other than catalog, resulting query is unrelated to initial intention. Fix this by using a hack: using "default_" prefix we can force catalog to search into categories, and not in available table columns.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22662 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 759e172a
......@@ -146,9 +146,9 @@ def checkReferenceListUniqueness(reference_list, model_uid, destination_payment_
Check each given reference not to already exist.\n
"""\n
if destination_payment_uid is None:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, resource_uid=model_uid, simulation_state=\'!=deleted\')\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, default_resource_uid=model_uid, simulation_state=\'!=deleted\')\n
else:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, resource_uid=model_uid,\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, default_resource_uid=model_uid,\n
simulation_state=\'!=deleted\')\n
assertReferenceMatchListEmpty(match_list, destination_payment_uid)\n
for reference in reference_list:\n
......
406
\ No newline at end of file
407
\ 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