Commit cc58f68b authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_base: Remove ParentDeliveryCategoryMovementGroup broken since its introduction apparently.

In contrary to the ParentDeliveryPropertyMovementGroup for property, it has
never actually checked the parent Delivery but the current one.
parent 41977120
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/PropertyMovementGroup_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -25,7 +25,6 @@
<item>Monthly Range Movement Group</item>
<item>Nested Line Movement Group</item>
<item>Order Movement Group</item>
<item>Parent Delivery Category Movement Group</item>
<item>Parent Delivery Property Movement Group</item>
<item>Parent Explanation Movement Group</item>
<item>Predicate</item>
......@@ -72,7 +71,6 @@
<item>Monthly Range Movement Group</item>
<item>Nested Line Movement Group</item>
<item>Order Movement Group</item>
<item>Parent Delivery Category Movement Group</item>
<item>Parent Delivery Property Movement Group</item>
<item>Parent Explanation Movement Group</item>
<item>Predicate</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>document_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Parent Delivery Category Movement Group</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string> The purpose of MovementGroup is to define how movements are grouped,\n
and how values are updated from simulation movements.\n
</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addParentDeliveryCategoryMovementGroup</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>movement_group</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Parent Delivery Category Movement Group</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>ParentDeliveryCategoryMovementGroup</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,7 +77,6 @@ Organisation | document_view
Organisation | financial_view
Organisation | jump_to_persons
Organisation | view
Parent Delivery Category Movement Group | view
Parent Delivery Property Movement Group | view
Parent Explanation Movement Group | view
Person Module | view
......
......@@ -13,7 +13,6 @@ Delivery Builder | Invoice Movement Group
Delivery Builder | Monthly Range Movement Group
Delivery Builder | Nested Line Movement Group
Delivery Builder | Order Movement Group
Delivery Builder | Parent Delivery Category Movement Group
Delivery Builder | Parent Delivery Property Movement Group
Delivery Builder | Parent Explanation Movement Group
Delivery Builder | Predicate
......@@ -46,7 +45,6 @@ Order Builder | Invoice Movement Group
Order Builder | Monthly Range Movement Group
Order Builder | Nested Line Movement Group
Order Builder | Order Movement Group
Order Builder | Parent Delivery Category Movement Group
Order Builder | Parent Delivery Property Movement Group
Order Builder | Parent Explanation Movement Group
Order Builder | Predicate
......
......@@ -42,7 +42,6 @@ Order Movement Group
Order Tool
Organisation
Organisation Module
Parent Delivery Category Movement Group
Parent Delivery Property Movement Group
Parent Explanation Movement Group
Person
......
......@@ -6588,9 +6588,6 @@ msgstr "صفحه ${page} از ${total_pages}"
msgid "Pakistani Rupee"
msgstr ""
msgid "Parent Delivery Category Movement Group"
msgstr ""
msgid "Parent Delivery Property Movement Group"
msgstr ""
......
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from Products.ERP5.Document.ParentDeliveryPropertyMovementGroup \
import ParentDeliveryPropertyMovementGroup
class ParentDeliveryCategoryMovementGroup(ParentDeliveryPropertyMovementGroup):
"""
Parent Delivery Category Movement Group is similar to Category
Movement Group, but it does grouping only by specified category values
on its parent simulation movement's delivery value and do not update
documents.
This is useful for acquired properties like payment_condition_*.
"""
meta_type = 'ERP5 Parent Delivery Category Movement Group'
portal_type = 'Parent Delivery Category Movement Group'
def _getPropertyDict(self, movement, **kw):
property_dict = {}
parent_delivery = self._getParentDelivery(movement)
if parent_delivery is not None:
for prop in self.getTestedPropertyList():
list_prop = '_%s_list' % prop
property_dict[list_prop] = sorted(
self._getProperty(movement, list_prop, []))
return property_dict
def test(self, document, property_dict, property_list=None, **kw):
if property_list not in (None, []):
target_property_list = [x for x in self.getTestedPropertyList() \
if x in property_list]
else:
target_property_list = self.getTestedPropertyList()
for prop in target_property_list:
list_prop = '_%s_list' % prop
if property_dict[list_prop] != \
sorted(self._getProperty(document, list_prop, [])):
return False, property_dict
return True, property_dict
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