Commit 603ddc0b authored by Jérome Perrin's avatar Jérome Perrin

budget: just copy variation categories as membership criterions

parent b9b14bc7
......@@ -51,21 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>budget = sci[\'object\']\n
\n
membership_criterion_category_list = budget.getMembershipCriterionCategoryList()\n
\n
# Remove all previous memberships from the same base\n
cleaned_membership_criterion_category_list = []\n
for base_category in budget.getMembershipCriterionBaseCategoryList():\n
if base_category in budget.getVariationBaseCategoryList():\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
cleaned_membership_criterion_category_list.extend(\n
budget.getVariationCategoryList(base_category_list=base_category))\n
\n
budget.setMembershipCriterionCategoryList(cleaned_membership_criterion_category_list)\n
budget.setMembershipCriterionCategoryList(budget.getVariationCategoryList())\n
</string> </value>
</item>
<item>
......
371
\ No newline at end of file
372
\ 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