diff --git a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.xml b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.xml index 5a3e6c2dd3ba9a4a954c750bf7c69f74acc55e29..216496c4fa7025f416bb3386b4b9945de0d1539a 100644 --- a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.xml +++ b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.xml @@ -96,18 +96,18 @@ transaction_line_list = transaction.getMovementList(\n portal_type=transaction.getPortalAccountingMovementTypeList())\n \n \n -def checkAccountingPeriodRecusivly(accounting_period, transaction_date):\n +def checkAccountingPeriodRecursivly(accounting_period, transaction_date):\n valid = accounting_period.getSimulationState() in (\'planned\', \'started\')\n if not valid:\n return False\n for sub_accounting_period in accounting_period.contentValues():\n if sub_accounting_period.getSimulationState() in (\n - \'deleted\', \'cancelled\'):\n + \'deleted\', \'cancelled\', \'draft\'):\n continue\n if sub_accounting_period.getStartDate().earliestTime() <= \\\n transaction_date <= \\\n sub_accounting_period.getStopDate().latestTime():\n - if not checkAccountingPeriodRecusivly(sub_accounting_period,\n + if not checkAccountingPeriodRecursivly(sub_accounting_period,\n transaction_date):\n return False\n return True\n @@ -136,7 +136,7 @@ if not skip_period_validation :\n transaction_date = transaction.getStartDate().earliestTime()\n valid_date = False\n if accounting_period is not None:\n - valid_date = checkAccountingPeriodRecusivly(accounting_period,\n + valid_date = checkAccountingPeriodRecursivly(accounting_period,\n transaction_date)\n \n if not valid_date:\n @@ -166,7 +166,7 @@ if not skip_period_validation :\n transaction_date = transaction.getStopDate().earliestTime()\n valid_date = False\n if accounting_period is not None:\n - valid_date = checkAccountingPeriodRecusivly(accounting_period,\n + valid_date = checkAccountingPeriodRecursivly(accounting_period,\n transaction_date)\n \n if not valid_date:\n diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index ec2aa7c82267d13ca80386aa8e68c5adf0feebeb..8799d84b2b47896b5d865765c1365bee5b5def64 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1535 \ No newline at end of file +1537 \ No newline at end of file