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
raiseError(\'date is not Defined\')\n
else:\n
if not skip_period_validation :\n
valid_date = 0\n
valid_date = False\n
# check the date is in an opened period\n
transaction_date = DateTime( transaction.getStartDate().year(),\n
transaction.getStartDate().month(),\n
......@@ -130,17 +130,18 @@ else:\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
# we do not account from their side.\n
valid_date = 1\n
valid_date = True\n
for apd in openned_accounting_period_list:\n
apd = apd.getObject()\n
if apd.getStartDate() <= transaction_date <= apd.getStopDate():\n
valid_date = 1\n
if not valid_date :\n
# Compare date, not datetime\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
raiseError("Date is not in an openned Accounting Period "\n
"for source section")\n
# do the same for destination section \n
if check_destination :\n
valid_date = 0\n
valid_date = False\n
transaction_date = DateTime( transaction.getStopDate().year(),\n
transaction.getStopDate().month(),\n
transaction.getStopDate().day(),\n
......@@ -150,11 +151,12 @@ else:\n
portal_type = "Accounting Period",\n
simulation_state = "planned")\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
apd = apd.getObject()\n
if apd.getStartDate() <= transaction_date <= apd.getStopDate():\n
valid_date = 1\n
# Compare date, not datetime\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
raiseError("Date is not in an openned Accounting Period "+\n
"for destination section")\n
......@@ -239,11 +241,13 @@ else:\n
<string>None</string>
<string>destination_section</string>
<string>currency</string>
<string>False</string>
<string>valid_date</string>
<string>DateTime</string>
<string>transaction_date</string>
<string>openned_accounting_period_list</string>
<string>len</string>
<string>True</string>
<string>_getiter_</string>
<string>apd</string>
</tuple>
......
......@@ -67,13 +67,35 @@
<item>
<key> <string>Add portal content</string> </key>
<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>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<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>
</item>
</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
* Fix Account_getAccountingTransactionList to show right previous 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