Commit 0eb39f6e authored by Sebastien Robin's avatar Sebastien Robin

modified permissions in invoice_causality_worfklow


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6121 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abe21e5b
...@@ -116,7 +116,7 @@ if transaction.getStartDate() in (None, \'\') :\n ...@@ -116,7 +116,7 @@ if transaction.getStartDate() in (None, \'\') :\n
raiseError(\'date is not Defined\')\n raiseError(\'date is not Defined\')\n
else:\n else:\n
if not skip_period_validation :\n if not skip_period_validation :\n
valid_date = 0\n valid_date = False\n
# check the date is in an opened period\n # check the date is in an opened period\n
transaction_date = DateTime( transaction.getStartDate().year(),\n transaction_date = DateTime( transaction.getStartDate().year(),\n
transaction.getStartDate().month(),\n transaction.getStartDate().month(),\n
...@@ -130,17 +130,18 @@ else:\n ...@@ -130,17 +130,18 @@ else:\n
# if the entity doesn\'t have any accounting period, we can\n # if the entity doesn\'t have any accounting period, we can\n
# consider that they do not want to use accounting periods or\n # consider that they do not want to use accounting periods or\n
# we do not account from their side.\n # we do not account from their side.\n
valid_date = 1\n valid_date = True\n
for apd in openned_accounting_period_list:\n for apd in openned_accounting_period_list:\n
apd = apd.getObject()\n apd = apd.getObject()\n
if apd.getStartDate() <= transaction_date <= apd.getStopDate():\n # Compare date, not datetime\n
valid_date = 1\n if apd.getStartDate().strftime("%Y/%m/%d") <= transaction_date.strftime("%Y/%m/%d") <= apd.getStopDate().strftime("%Y/%m/%d"):\n
if not valid_date :\n valid_date = True\n
if not valid_date:\n
raiseError("Date is not in an openned Accounting Period "\n raiseError("Date is not in an openned Accounting Period "\n
"for source section")\n "for source section")\n
# do the same for destination section \n # do the same for destination section \n
if check_destination :\n if check_destination :\n
valid_date = 0\n valid_date = False\n
transaction_date = DateTime( transaction.getStopDate().year(),\n transaction_date = DateTime( transaction.getStopDate().year(),\n
transaction.getStopDate().month(),\n transaction.getStopDate().month(),\n
transaction.getStopDate().day(),\n transaction.getStopDate().day(),\n
...@@ -150,11 +151,12 @@ else:\n ...@@ -150,11 +151,12 @@ else:\n
portal_type = "Accounting Period",\n portal_type = "Accounting Period",\n
simulation_state = "planned")\n simulation_state = "planned")\n
if len(openned_accounting_period_list) == 0:\n if len(openned_accounting_period_list) == 0:\n
valid_date = 1\n valid_date = True\n
for apd in openned_accounting_period_list:\n for apd in openned_accounting_period_list:\n
apd = apd.getObject()\n apd = apd.getObject()\n
if apd.getStartDate() <= transaction_date <= apd.getStopDate():\n # Compare date, not datetime\n
valid_date = 1\n if apd.getStartDate().strftime("%Y/%m/%d") <= transaction_date.strftime("%Y/%m/%d") <= apd.getStopDate().strftime("%Y/%m/%d"):\n
valid_date = True\n
if not valid_date :\n if not valid_date :\n
raiseError("Date is not in an openned Accounting Period "+\n raiseError("Date is not in an openned Accounting Period "+\n
"for destination section")\n "for destination section")\n
...@@ -239,11 +241,13 @@ else:\n ...@@ -239,11 +241,13 @@ else:\n
<string>None</string> <string>None</string>
<string>destination_section</string> <string>destination_section</string>
<string>currency</string> <string>currency</string>
<string>False</string>
<string>valid_date</string> <string>valid_date</string>
<string>DateTime</string> <string>DateTime</string>
<string>transaction_date</string> <string>transaction_date</string>
<string>openned_accounting_period_list</string> <string>openned_accounting_period_list</string>
<string>len</string> <string>len</string>
<string>True</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>apd</string> <string>apd</string>
</tuple> </tuple>
......
...@@ -67,13 +67,35 @@ ...@@ -67,13 +67,35 @@
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
2006-03-17 Seb
* changed permissions in invoice_causality_worfklow because it was impossible to add new accounting lines. I'm not very happy with this change, we should find a better solution.
2006-03-17 Kevin
* Compare date instead of datetime in accounting_workflow/scripts/validateTransaction to avoid problems when we reach accounting period limits.
2006-03-16 Kevin
* Show the portal type of lines in General Ledger Report.
2006-03-15 Kevin
* Delete Account_getDestinationSectionList and Account_getSourcePaymentList.
2006-03-09 Kevin 2006-03-09 Kevin
* Fix Account_getAccountingTransactionList to show right previous balance. * Fix Account_getAccountingTransactionList to show right previous balance.
* Update AccountModule_viewGeneralLedgerReport to let the General Ledger report show good start, stop and period balance. * Update AccountModule_viewGeneralLedgerReport to let the General Ledger report show good start, stop and period balance.
......
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