[Erp5-report] r38108 vincent - in /erp5/trunk: bt5/erp5_banking_core/SkinTemplateItem/porta...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 1 15:09:10 CEST 2010
Author: vincent
Date: Wed Sep 1 15:09:00 2010
New Revision: 38108
URL: http://svn.erp5.org?rev=38108&view=rev
Log:
Fix CashMovementNewNotEmitted not really moving containers.
It is incorrect for CashContainer class not to inherit from BaobabMixin, as it
needs "Baobab" accessors.
It is useless for CashContainer to define manually accessors which are
properly and generically defined in BaobabMixin.
Add missing type-based method so that Cash Containers get a correct
destination, so they actually move containers around (as per Trackinglist
meaning).
Added:
erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashMovementNewNotEmittedContainer_getBaobabDestination.xml
Modified:
erp5/trunk/bt5/erp5_banking_core/bt/revision
erp5/trunk/products/ERP5Banking/Document/CashContainer.py
Added: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashMovementNewNotEmittedContainer_getBaobabDestination.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashMovementNewNotEmittedContainer_getBaobabDestination.xml?rev=38108&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashMovementNewNotEmittedContainer_getBaobabDestination.xml (added)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashMovementNewNotEmittedContainer_getBaobabDestination.xml [utf8] Wed Sep 1 15:09:00 2010
@@ -0,0 +1,148 @@
+<?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>return context.getDeliveryValue().getBaobabDestination()\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>*args, **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>args</string>
+ <string>kw</string>
+ <string>_getattr_</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>CashMovementNewNotEmittedContainer_getBaobabDestination</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=38108&r1=38107&r2=38108&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] Wed Sep 1 15:09:00 2010
@@ -1 +1 @@
-544
+545
Modified: erp5/trunk/products/ERP5Banking/Document/CashContainer.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/Document/CashContainer.py?rev=38108&r1=38107&r2=38108&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/Document/CashContainer.py [utf8] (original)
+++ erp5/trunk/products/ERP5Banking/Document/CashContainer.py [utf8] Wed Sep 1 15:09:00 2010
@@ -29,9 +29,9 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5.Document.Container import Container
+from Products.ERP5Banking.BaobabMixin import BaobabMixin
-
-class CashContainer(Container):
+class CashContainer(BaobabMixin, Container):
"""
A Cash DeliveryLine object allows to implement lines
in Cash Deliveries (packing list, Check payment, Cash Movement, etc.).
@@ -64,22 +64,3 @@ class CashContainer(Container):
, PropertySheet.Reference
)
- security.declareProtected(Permissions.View, 'getBaobabSource')
- def getBaobabSource(self):
- """
- Returns a calculated source
- """
- script = self._getTypeBasedMethod('getBaobabSource')
- if script is not None:
- return script(self)
- return self.getSource()
-
- security.declareProtected(Permissions.View, 'getBaobabDestination')
- def getBaobabDestination(self):
- """
- Returns a calculated destination
- """
- script = self._getTypeBasedMethod('getBaobabDestination')
- if script is not None:
- return script(self)
- return self.getDestination()
More information about the Erp5-report
mailing list