• Jérome Perrin's avatar
    accounting: stop using portal_catalog.getObject · d32caa26
    Jérome Perrin authored
    This is not public API and is not supposed to be used outside of catalog
    tool.
    
    Using getObject here is also wrong because it does not apply security
    and does not check provided argument type.
    
    To prevent retrieving too many documents, we usually pass limit=2 for
    safety.
    
    To detect inconsistencies, when only one result is expected we rely on
    `brain, = portal_catalog(limit=2)` style unpacking to fail if more than
    one result were found.
    d32caa26
AccountingTransactionModule_setGroupingReference.py 5.2 KB