Commit 9630afdb authored by Kevin Deldycke's avatar Kevin Deldycke

Check currency.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10940 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a5bf29a2
...@@ -70,6 +70,10 @@ ...@@ -70,6 +70,10 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
"""\n
Check that all datas necessary to auto-calculate the pay sheet are set.\n
TODO: Translate portal status message.\n
"""\n
paysheet = context.getObject()\n paysheet = context.getObject()\n
paysheet_type = paysheet.getPortalType()\n paysheet_type = paysheet.getPortalType()\n
employee = paysheet.getDestinationSection()\n employee = paysheet.getDestinationSection()\n
...@@ -78,6 +82,9 @@ employer = paysheet.getSourceSection()\n ...@@ -78,6 +82,9 @@ employer = paysheet.getSourceSection()\n
if paysheet.getGrossSalary() == None:\n if paysheet.getGrossSalary() == None:\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Gross+salary+is+required\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Gross+salary+is+required\')\n
\n \n
if paysheet.getResource() == None:\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Currency+is+required\')\n
\n
if paysheet.getStartDate() == None:\n if paysheet.getStartDate() == None:\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Start+date+is+required\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Start+date+is+required\')\n
\n \n
......
95 98
\ No newline at end of file \ No newline at end of file
0.2.3 0.2.4
\ 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