Commit 9e13bf04 authored by Julien Muchembled's avatar Julien Muchembled

Fix wrong SQL join in BudgetCell_getEngagedBudget

parent 1f964741
...@@ -50,10 +50,12 @@ ...@@ -50,10 +50,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw = dict()\n <value> <string>line = context.getParentValue()\n
budget = context.getParentValue().getParentValue()\n budget = line.getParentValue()\n
budget_model = budget.getSpecialiseValue(portal_type=\'Budget Model\')\n budget_model = budget.getSpecialiseValue(portal_type=\'Budget Model\')\n
if budget_model is not None:\n if budget_model is None:\n
kw = {}\n
else:\n
kw = budget_model.getInventoryQueryDict(context)\n kw = budget_model.getInventoryQueryDict(context)\n
\n \n
if from_date:\n if from_date:\n
...@@ -61,14 +63,16 @@ if from_date:\n ...@@ -61,14 +63,16 @@ if from_date:\n
if at_date:\n if at_date:\n
kw[\'at_date\'] = at_date\n kw[\'at_date\'] = at_date\n
\n \n
kw.setdefault(\'explanation_simulation_state\', context.getPortalReservedInventoryStateList() \\\n portal = budget.getPortalObject()\n
+ context.getPortalCurrentInventoryStateList() \\\n kw.setdefault(\'stock_explanation_simulation_state\',\n
+ context.getPortalTransitInventoryStateList())\n portal.getPortalReservedInventoryStateList() +\n
portal.getPortalCurrentInventoryStateList() +\n
portal.getPortalTransitInventoryStateList())\n
\n \n
# XXX use getBudgetConsumptionMethod ?\n # XXX use getBudgetConsumptionMethod ?\n
if src__:\n if src__:\n
return \'-- %s\\n%s\' % (kw, context.portal_simulation.getCurrentInventoryAssetPrice(src__=src__, **kw))\n return \'-- %s\\n%s\' % (kw, portal.portal_simulation.getCurrentInventoryAssetPrice(src__=src__, **kw))\n
return (context.portal_simulation.getInventoryAssetPrice(**kw) or 0) * context.getParentValue().BudgetLine_getConsumptionSign()\n return (portal.portal_simulation.getInventoryAssetPrice(**kw) or 0) * line.BudgetLine_getConsumptionSign()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
364 365
\ 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