[Erp5-report] r25633 - /erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 20 11:14:58 CET 2009
Author: jerome
Date: Fri Feb 20 11:14:55 2009
New Revision: 25633
URL: http://svn.erp5.org?rev=25633&view=rev
Log:
when budget line or budget cell share a category variation with the budget, we
show only subcategories of the budget category, and we include the budget
category itself.
Modified:
erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py
Modified: erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py?rev=25633&r1=25632&r2=25633&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/CategoryBudgetVariation.py [utf8] Fri Feb 20 11:14:55 2009
@@ -129,20 +129,22 @@
'preferred_category_child_item_list_method_id',
'getCategoryChildCompactLogicalPathItemList')
- # If this category is defined on budget level, only show subcategories.
+ item_list_method_parameter_dict = dict(
+ base=1,
+ local_sort_id=('int_index', 'translated_title'),
+ checked_permission='View')
+
+ # If this category is defined on budget level, starts at this level
budget = budget_line.getParentValue()
if base_category in budget.getVariationBaseCategoryList():
for budget_variation_category in budget.getVariationCategoryList():
if budget_variation_category.split('/')[0] == base_category:
base_category = budget_variation_category
+ item_list_method_parameter_dict['is_self_excluded'] = False
break
return getattr(portal.portal_categories.unrestrictedTraverse(base_category),
- item_list_method)(
- base=1,
- local_sort_id=('int_index',
- 'translated_title'),
- checked_permission='View')
+ item_list_method)(**item_list_method_parameter_dict)
def initializeBudgetLine(self, budget_line):
"""Initialize a budget line
More information about the Erp5-report
mailing list