Commit d80ef43e authored by Łukasz Nowak's avatar Łukasz Nowak

Caller trust this method, so it cannot trust catalog.

parent b6fdfc2c
...@@ -50,14 +50,12 @@ ...@@ -50,14 +50,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal_catalog = context.getPortalObject().portal_catalog\n
accounting_module = portal.getDefaultModule(\'Sale Invoice Transaction\')\n simulation_state = \'planned\'\n
\n # use catalog to prefetch, but check later in ZODB\n
invoice = accounting_module.searchFolder(\n return [q.getObject() for q in portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\')\n simulation_state=simulation_state) if q.getSimulationState() == simulation_state]\n
\n
return invoice\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
343 344
\ No newline at end of file \ 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