Commit a4f99f09 authored by Vincent Pelletier's avatar Vincent Pelletier

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).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38108 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1f5918a9
<?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>
......@@ -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()
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