Commit 0f113b27 authored by Jérome Perrin's avatar Jérome Perrin

Fix the way categories are cleaned up before beeing copied, remove obsolete comment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31108 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 026ffa70
......@@ -23,8 +23,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string>TODO:\r\n
changing a membership must be "recursive" (or budget line/cell membership method should dynamically read from their parent)</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>groups</string> </key>
......
......@@ -56,18 +56,19 @@
<value> <string>budget = sci[\'object\']\n
\n
membership_criterion_category_list = budget.getMembershipCriterionCategoryList()\n
\n
for base_category in budget.getMembershipCriterionBaseCategoryList():\n
if base_category in budget.getVariationBaseCategoryList():\n
# Remove all previous membership from the same base\n
# Remove all previous memberships from the same base\n
cleaned_membership_criterion_category_list = []\n
for membership_criterion_category in membership_criterion_category_list:\n
if not membership_criterion_category.startswith("%s/" % base_category):\n
cleaned_membership_criterion_category_list.append(membership_criterion_category)\n
# Add the new one\n
membership_criterion_category_list.extend(\n
cleaned_membership_criterion_category_list.extend(\n
budget.getVariationCategoryList(base_category_list=base_category))\n
\n
budget.setMembershipCriterionCategoryList(membership_criterion_category_list)\n
budget.setMembershipCriterionCategoryList(cleaned_membership_criterion_category_list)\n
</string> </value>
</item>
<item>
......
267
\ No newline at end of file
269
\ 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