diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.xml b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.xml index ea4947d1b8e73af5315e5729d2b42397c8962d0a..43223bbaaa6f73d19ba746de84d9fdf5068e6390 100644 --- a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.xml +++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.xml @@ -61,6 +61,8 @@ from pprint import pformat\n portal = context.getPortalObject()\n request= portal.REQUEST\n +from_date = request.get(\'from_date\')\n +at_date = request.get(\'at_date\')\n \n # this report can be called on a budget ...\n if context.getPortalType() == \'Budget\':\n @@ -74,8 +76,6 @@ else:\n # ... or on the budget module, and in this case, all budgets are used\n defined_group = request[\'section_category\']\n strict_section_membership = request.get(\'section_category_strict\', False)\n - from_date = request.get(\'from_date\')\n - at_date = request.get(\'at_date\')\n validation_state = request.get(\'validation_state\', [])\n \n budget_list = portal.portal_catalog.searchResults(\n @@ -163,8 +163,21 @@ for budget in budget_list:\n \n level_1_line_list = []\n \n - consumed_budget_dict = budget_line.getConsumedBudgetDict()\n - engaged_budget_dict = budget_line.getEngagedBudgetDict()\n + if at_date and from_date:\n + consumed_budget_dict = budget_line.getConsumedBudgetDict(\n + from_date=from_date, at_date=at_date)\n + engaged_budget_dict = budget_line.getEngagedBudgetDict(\n + from_date=from_date, at_date=at_date)\n + elif at_date:\n + consumed_budget_dict = budget_line.getConsumedBudgetDict(at_date=at_date)\n + engaged_budget_dict = budget_line.getEngagedBudgetDict(at_date=at_date)\n + elif from_date:\n + consumed_budget_dict = budget_line.getConsumedBudgetDict(from_date=from_date)\n + engaged_budget_dict = budget_line.getEngagedBudgetDict(from_date=from_date)\n + else:\n + consumed_budget_dict = budget_line.getConsumedBudgetDict()\n + engaged_budget_dict = budget_line.getEngagedBudgetDict()\n +\n budget_line_cell_range = budget_line.BudgetLine_asCellRange()\n budget_line_as_cell_range_matrixbox =\\\n budget_line.BudgetLine_asCellRange(matrixbox=1)\n diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog.xml b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog.xml index 24995bea5baeb5c1e8541b134e34e22e3e6ae8ed..0107f43e73fd4926d33ef2732036f15319dbadb8 100644 --- a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog.xml +++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog.xml @@ -93,6 +93,8 @@ <key> <string>left</string> </key> <value> <list> + <string>your_from_date</string> + <string>your_at_date</string> <string>your_format</string> <string>your_deferred_style</string> </list> diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_at_date.xml b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_at_date.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b344995ebc2526b6b8bbff15319a05b1dda46c4 --- /dev/null +++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_at_date.xml @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_at_date</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>your_at_date</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewDialogFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_from_date.xml b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_from_date.xml new file mode 100644 index 0000000000000000000000000000000000000000..9d7b5e377b53b3f45059a81e392d3fb29952fe1c --- /dev/null +++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_viewBudgetConsumptionReportDialog/your_from_date.xml @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_from_date</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>your_from_date</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewDialogFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_budget/bt/revision b/bt5/erp5_budget/bt/revision index 387c46fdec89e3cb2d1358c93270eeeeec85d13f..d35d5f782448e98ccbcb1fa8e162c079cc627e52 100644 --- a/bt5/erp5_budget/bt/revision +++ b/bt5/erp5_budget/bt/revision @@ -1 +1 @@ -346 \ No newline at end of file +347 \ No newline at end of file