[Erp5-report] r15162 - in /erp5/trunk/bt5/erp5_banking_core: SkinTemplateItem/portal_skins/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 6 12:29:31 CEST 2007
Author: seb
Date: Fri Jul 6 12:29:31 2007
New Revision: 15162
URL: http://svn.erp5.org?rev=15162&view=rev
Log:
- automatically define start date and stop date on currency exchange line in order to make it available for the full day.
- allow some document to not be closed when we close the counter date
- the accounting date make all operations after the date working
Added:
erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyExchangeLine_init.xml
Modified:
erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkAccountingDateOpen.xml
erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml
erp5/trunk/bt5/erp5_banking_core/bt/revision
Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkAccountingDateOpen.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkAccountingDateOpen.xml?rev=15162&r1=15161&r2=15162&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkAccountingDateOpen.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkAccountingDateOpen.xml Fri Jul 6 12:29:31 2007
@@ -65,7 +65,9 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string># Raise ValidationFailed if the accounting date is not opened for the given date and the given site\n
+ <value> <string encoding="cdata"><![CDATA[
+
+# Raise ValidationFailed if the accounting date is not opened for the given date and the given site\n
\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
@@ -91,10 +93,13 @@
#context.log(\'Baobab_checkAccountingDateOpen\', \'get site for vault %s\' %(site))\n
site = context.Baobab_getVaultSite(site)\n
\n
-if context.portal_catalog.countResults(portal_type=\'Accounting Date\', start_date=str(date), site_id=site.getId(), simulation_state="opened")[0][0] == 0:\n
- msg = Message(domain = "ui", message="Transaction not in the good counter date")\n
+if context.portal_catalog.countResults(portal_type=\'Accounting Date\', start_date={\'query\':\'<=%s\' % (date, ), \'type\': \'date\', \'format\': \'%Y/%m/%d\'}, site_id=site.getId(), simulation_state="opened", limit=1)[0][0] == 0:\n
+ raise Exception, context.portal_catalog.countResults(portal_type=\'Accounting Date\', start_date={\'query\':\'<=%s\' % (date, ), \'type\': \'date\', \'format\': \'%Y/%m/%d\'}, site_id=site.getId(), simulation_state="opened", limit=1, src__=1)\n
+ msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
-</string> </value>
+
+
+]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -163,7 +168,7 @@
<string>site_list</string>
<string>len</string>
<string>_getitem_</string>
- <string>str</string>
+ <string>Exception</string>
<string>msg</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml?rev=15162&r1=15161&r2=15162&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_getRemainingOperationList.xml Fri Jul 6 12:29:31 2007
@@ -91,6 +91,7 @@
(simulation_state == \'finished\' and \'siege\' in here.getSource(\'\'))\n
)\n
)\n
+ or (portal_type == \'Monetary Destruction\' and simulation_state == \'ordered\')\n
):\n
append(document)\n
\n
Added: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyExchangeLine_init.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyExchangeLine_init.xml?rev=15162&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyExchangeLine_init.xml (added)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyExchangeLine_init.xml Fri Jul 6 12:29:31 2007
@@ -1,0 +1,157 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>from DateTime import DateTime\n
+\n
+current_date_string = DateTime().strftime(\'%Y-%m-%d\')\n
+start_date = DateTime(\'%s 00:00\' % current_date_string)\n
+stop_date = DateTime(\'%s 23:59\' % current_date_string)\n
+context.setStartDate(start_date)\n
+context.setStopDate(stop_date)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>**kw</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>kw</string>
+ <string>DateTime</string>
+ <string>_getattr_</string>
+ <string>current_date_string</string>
+ <string>start_date</string>
+ <string>stop_date</string>
+<string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>CurrencyExchangeLine_init</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_banking_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/bt/revision?rev=15162&r1=15161&r2=15162&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision Fri Jul 6 12:29:31 2007
@@ -1,1 +1,1 @@
-308
+310
More information about the Erp5-report
mailing list