Commit 2019f88f authored by Fabien Morin's avatar Fabien Morin

getEffectiveModel call was not good since the parameter changes. Update all calls

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28038 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e57bdccf
No related merge requests found
...@@ -57,7 +57,9 @@ ...@@ -57,7 +57,9 @@
request = context.REQUEST\n request = context.REQUEST\n
quantity_renderer = context.Base_viewFieldLibrary.my_money_quantity.render_pdf\n quantity_renderer = context.Base_viewFieldLibrary.my_money_quantity.render_pdf\n
\n \n
model = context.getSpecialiseValue().getEffectiveModel(context)\n model = context.getSpecialiseValue().getEffectiveModel(\\\n
start_date=context.getStartDate(),\n
stop_date=context.getStopDate())\n
\n \n
def getFieldAsString(field):\n def getFieldAsString(field):\n
return \', \'.join(getFieldAsLineList(field))\n return \', \'.join(getFieldAsLineList(field))\n
......
...@@ -59,27 +59,26 @@ ...@@ -59,27 +59,26 @@
This script get year to date amount for the slice corresponding to slice_path\n This script get year to date amount for the slice corresponding to slice_path\n
of the model.\n of the model.\n
\'\'\'\n \'\'\'\n
\n
\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
accounting_module = portal.accounting_module\n accounting_module = portal.accounting_module\n
\n \n
from_date=DateTime(context.getStartDate().year(), 1, 1)\n from_date=DateTime(context.getStartDate().year(), 1, 1)\n
to_date=context.getStartDate()\n to_date=context.getStartDate()\n
\n \n
search_params = \\\n search_params = {\n
{\n \'portal_type\' : \'Pay Sheet Transaction\',\n
\'portal_type\' : \'Pay Sheet Transaction\',\n \'delivery.start_date\' : {\'range\': "minmax", \'query\': (from_date, to_date)},\n
\'delivery.start_date\' : {\'range\': "minmax", \'query\': (from_date, to_date)},\n \'delivery.source_section_uid\' : context.getSourceSectionUid(),\n
\'delivery.source_section_uid\' : context.getSourceSectionUid(),\n \'simulation_state\' : [\'stopped\', \'delivered\'],\n
\'simulation_state\' : [\'stopped\', \'delivered\'],\n }\n
}\n
\n \n
paysheet_list = [r.getObject() for r in accounting_module.searchFolder(**search_params)]\n paysheet_list = [r.getObject() for r in accounting_module.searchFolder(**search_params)]\n
\n \n
yearly_slice_amount = 0\n yearly_slice_amount = 0\n
# get the slice value for this paysheet :\n # get the slice value for this paysheet :\n
model = context.getSpecialiseValue().getEffectiveModel(context)\n model = context.getSpecialiseValue().getEffectiveModel(\\\n
start_date=context.getStartDate(),\n
stop_date=context.getStopDate())\n
slice = model.getCell(slice_path, paysheet=context)\n slice = model.getCell(slice_path, paysheet=context)\n
\n \n
if slice is None:\n if slice is None:\n
...@@ -99,7 +98,9 @@ else:\n ...@@ -99,7 +98,9 @@ else:\n
yearly_slice_amount += slice_amount\n yearly_slice_amount += slice_amount\n
\n \n
for paysheet in paysheet_list :\n for paysheet in paysheet_list :\n
model = paysheet.getSpecialiseValue().getEffectiveModel(paysheet)\n model = paysheet.getSpecialiseValue().getEffectiveModel(\\\n
start_date=paysheet.getStartDate(),\n
stop_date=paysheet.getStopDate())\n
if model is not None:\n if model is not None:\n
slice = model.getCell(slice_path)\n slice = model.getCell(slice_path)\n
plafond_max = slice.getQuantityRangeMax()\n plafond_max = slice.getQuantityRangeMax()\n
......
104 106
\ 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