Commit a137b213 authored by Jérome Perrin's avatar Jérome Perrin

erp5_accounting_ui_test: clear the cache when we validate a new account

This cache is used by AccountingTransactionLine_getNodeItemList
parent 38a21ef2
......@@ -57,10 +57,16 @@ for rule in portal.portal_rules.objectValues():\n
if rule.getValidationState() != \'validated\':\n
rule.validate()\n
\n
# open all accounts\n
# open all accounts, and clear cache if we have validated some new accounts\n
validated = False\n
for account in portal.account_module.objectValues():\n
if account.getValidationState() != \'validated\':\n
account.validate()\n
validated = True\n
\n
if validated:\n
portal.portal_caches.clearCache(cache_factory_list=(\'erp5_content_long\', ))\n
\n
\n
# validate third parties and set them a dummy region, because it\'s required\n
for entity in ( portal.organisation_module.objectValues() +\n
......
195
\ No newline at end of file
196
\ 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