Commit 15554b1f authored by Jérome Perrin's avatar Jérome Perrin

get group and region from the budget cell, not the budget line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23936 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1289bbca
...@@ -81,7 +81,7 @@ if parent.isMemberOf(\n ...@@ -81,7 +81,7 @@ if parent.isMemberOf(\n
kw[\'node_category\'] = parent.getFinancialSection(base=1)\n kw[\'node_category\'] = parent.getFinancialSection(base=1)\n
if parent.isMemberOf(\n if parent.isMemberOf(\n
\'budget_line_variation/budget_variation/node_category_budget_section\'):\n \'budget_line_variation/budget_variation/node_category_budget_section\'):\n
# kw[\'stock.function_uid\'] = parent.getBudgetSectionUid() #(base=1)\n # kw[\'stock.function_uid\'] = parent.getBudgetSectionUid()\n
kw[\'node_category\'] = parent.getBudgetSection(base=1)\n kw[\'node_category\'] = parent.getBudgetSection(base=1)\n
\n \n
# mirror node\n # mirror node\n
...@@ -95,32 +95,30 @@ if (context.isMemberOf(\n ...@@ -95,32 +95,30 @@ if (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/section_category_group\') or\n \'budget_cell_variation/budget_variation/section_category_group\') or\n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/section_category_group\')):\n \'budget_line_variation/budget_variation/section_category_group\')):\n
kw[\'section_category\'] = parent.getGroup(base=1)\n kw[\'section_category\'] = context.getGroup(base=1)\n
elif (context.isMemberOf(\n elif (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/section_category_region\') or\n \'budget_cell_variation/budget_variation/section_category_region\') or\n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/section_category_region\')):\n \'budget_line_variation/budget_variation/section_category_region\')):\n
kw[\'section_category\'] = parent.getRegion(base=1)\n kw[\'section_category\'] = context.getRegion(base=1)\n
\n \n
# mirror section category\n # mirror section category\n
if (context.isMemberOf(\n if (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/mirror_section_category_group\') or \n \'budget_cell_variation/budget_variation/mirror_section_category_group\') or \n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/mirror_section_category_group\')):\n \'budget_line_variation/budget_variation/mirror_section_category_group\')):\n
kw[\'mirror_section_category\'] = parent.getGroup(base=1)\n kw[\'mirror_section_category\'] = context.getGroup(base=1)\n
elif (context.isMemberOf(\n elif (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/mirror_section_category_region\') or \n \'budget_cell_variation/budget_variation/mirror_section_category_region\') or \n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/mirror_section_category_region\')):\n \'budget_line_variation/budget_variation/mirror_section_category_region\')):\n
kw[\'mirror_section_category\'] = parent.getRegion(base=1)\n kw[\'mirror_section_category\'] = context.getRegion(base=1)\n
\n
\n \n
\n \n
# FIXME: this should be configured on the budget domain\n # FIXME: this should be configured on the budget domain\n
#kw[\'node_category\'] = (\'account_type/asset\', \'account_type/expense\')\n #kw[\'node_category\'] = (\'account_type/asset\', \'account_type/expense\')\n
\n \n
\n \n
\n
if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\')):\n if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\')):\n
if parent.getBudgetLineType() == \'expense\':\n if parent.getBudgetLineType() == \'expense\':\n
kw[\'portal_type\'] = [\'Purchase Invoice Transaction Line\', \'Invoice Line\']\n kw[\'portal_type\'] = [\'Purchase Invoice Transaction Line\', \'Invoice Line\']\n
...@@ -128,8 +126,7 @@ if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\ ...@@ -128,8 +126,7 @@ if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\
kw[\'portal_type\'] = [\'Sale Invoice Transaction Line\', \'Invoice Line\']\n kw[\'portal_type\'] = [\'Sale Invoice Transaction Line\', \'Invoice Line\']\n
return -context.portal_simulation.getInventoryAssetPrice(**kw)\n return -context.portal_simulation.getInventoryAssetPrice(**kw)\n
\n \n
\n return context.portal_simulation.getInventoryAssetPrice(**kw)\n
return context.portal_simulation.getInventory(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -96,24 +96,24 @@ if (context.isMemberOf(\n ...@@ -96,24 +96,24 @@ if (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/section_category_group\') or\n \'budget_cell_variation/budget_variation/section_category_group\') or\n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/section_category_group\')):\n \'budget_line_variation/budget_variation/section_category_group\')):\n
kw[\'section_category\'] = parent.getGroup(base=1)\n kw[\'section_category\'] = context.getGroup(base=1)\n
elif (context.isMemberOf(\n elif (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/section_category_region\') or\n \'budget_cell_variation/budget_variation/section_category_region\') or\n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/section_category_region\')):\n \'budget_line_variation/budget_variation/section_category_region\')):\n
kw[\'section_category\'] = parent.getRegion(base=1)\n kw[\'section_category\'] = context.getRegion(base=1)\n
\n \n
# mirror section category\n # mirror section category\n
if (context.isMemberOf(\n if (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/mirror_section_category_group\') or \n \'budget_cell_variation/budget_variation/mirror_section_category_group\') or \n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/mirror_section_category_group\')):\n \'budget_line_variation/budget_variation/mirror_section_category_group\')):\n
kw[\'mirror_section_category\'] = parent.getGroup(base=1)\n kw[\'mirror_section_category\'] = context.getGroup(base=1)\n
elif (context.isMemberOf(\n elif (context.isMemberOf(\n
\'budget_cell_variation/budget_variation/mirror_section_category_region\') or \n \'budget_cell_variation/budget_variation/mirror_section_category_region\') or \n
context.isMemberOf(\n context.isMemberOf(\n
\'budget_line_variation/budget_variation/mirror_section_category_region\')):\n \'budget_line_variation/budget_variation/mirror_section_category_region\')):\n
kw[\'mirror_section_category\'] = parent.getRegion(base=1)\n kw[\'mirror_section_category\'] = context.getRegion(base=1)\n
\n \n
\n \n
if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\')):\n if (parent.isMemberOf(\'budget_cell_variation/budget_variation/budget_line_type\')):\n
......
165 167
\ 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