Commit 7da3d912 authored by Rafael Monnerat's avatar Rafael Monnerat

Update from upstream/master

parents 1dc2e88d 9805e260
...@@ -72,4 +72,6 @@ for item_value in value_list: ...@@ -72,4 +72,6 @@ for item_value in value_list:
sub_field_dict[item_key]['value'] = item_value sub_field_dict[item_key]['value'] = item_value
# Return the list of subfield configuration. # Return the list of subfield configuration.
return sub_field_dict.values() return sorted(
sub_field_dict.values(),
key=lambda v: v['title'])
...@@ -90,23 +90,22 @@ Test Account GAP Parallel listfield. ...@@ -90,23 +90,22 @@ Test Account GAP Parallel listfield.
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//label[@for='subfield_field_my_gap_list_my_country/my_accounting_standards' and text()='GAP - My Accounting Standards']</td> <td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//label[@for='subfield_field_my_gap_list_another_country/another_standards' and text()='GAP - Another Standards']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//p[text()='1 - Equity Accounts']</td> <td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//p[text()='1 - Dummy Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//label[@for='subfield_field_my_gap_list_another_country/another_standards' and text()='GAP - Another Standards']</td> <td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//label[@for='subfield_field_my_gap_list_my_country/my_accounting_standards' and text()='GAP - My Accounting Standards']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//p[text()='1 - Dummy Account']</td> <td>//div[@data-gadget-scope='field_my_gap_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//p[text()='1 - Equity Accounts']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -305,7 +305,8 @@ class TestConversionInSimulation(AccountingTestCase): ...@@ -305,7 +305,8 @@ class TestConversionInSimulation(AccountingTestCase):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
invoice_transaction_movement_1 =\ invoice_transaction_movement_1 =\
invoice_transaction_applied_rule.contentValues()[0] invoice_transaction_applied_rule.contentValues()[0]
self.assertEqual(currency, self.assertEqual(currency,
...@@ -397,7 +398,8 @@ class TestConversionInSimulation(AccountingTestCase): ...@@ -397,7 +398,8 @@ class TestConversionInSimulation(AccountingTestCase):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
invoice_transaction_movement =\ invoice_transaction_movement =\
invoice_transaction_applied_rule.contentValues()[0] invoice_transaction_applied_rule.contentValues()[0]
self.assertEqual(currency, self.assertEqual(currency,
...@@ -684,7 +686,8 @@ class TestConversionInSimulation(AccountingTestCase): ...@@ -684,7 +686,8 @@ class TestConversionInSimulation(AccountingTestCase):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
result_list = [] result_list = []
for invoice_transaction_movement in invoice_transaction_applied_rule.contentValues(): for invoice_transaction_movement in invoice_transaction_applied_rule.contentValues():
result_list.append((invoice_transaction_movement.getSource(), invoice_transaction_movement.getDestinationTotalAssetPrice())) result_list.append((invoice_transaction_movement.getSource(), invoice_transaction_movement.getDestinationTotalAssetPrice()))
...@@ -788,7 +791,8 @@ class TestConversionInSimulation(AccountingTestCase): ...@@ -788,7 +791,8 @@ class TestConversionInSimulation(AccountingTestCase):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
result_list = [] result_list = []
for invoice_transaction_movement in invoice_transaction_applied_rule.contentValues(): for invoice_transaction_movement in invoice_transaction_applied_rule.contentValues():
result_list.append((invoice_transaction_movement.getSource(), invoice_transaction_movement.getSourceTotalAssetPrice())) result_list.append((invoice_transaction_movement.getSource(), invoice_transaction_movement.getSourceTotalAssetPrice()))
......
...@@ -581,12 +581,24 @@ class TestCurrencyExchangeCell(CurrencyExchangeTestCase): ...@@ -581,12 +581,24 @@ class TestCurrencyExchangeCell(CurrencyExchangeTestCase):
euro_to_usd.setPriceCurrencyValue(usd) euro_to_usd.setPriceCurrencyValue(usd)
self.assertEqual(2, len(euro_to_usd.contentValues())) self.assertEqual(2, len(euro_to_usd.contentValues()))
# cell range is like this: # cell range is like this, matrix cell range does not have ordering
self.assertEqual([ # of the keys, only asCellRange script has.
self.assertEqual(
euro_to_usd.CurrencyExchangeLine_asCellRange(base_id='path'),
(
['currency_exchange_type/type_a', 'currency_exchange_type/type_b'], ['currency_exchange_type/type_a', 'currency_exchange_type/type_b'],
['resource/%s' % euro.getRelativeUrl()], ['resource/%s' % euro.getRelativeUrl()],
['price_currency/%s' % usd.getRelativeUrl()], ['price_currency/%s' % usd.getRelativeUrl()],
], euro_to_usd.getCellRange(base_id='path')) )
)
self.assertEqual(
[sorted(r) for r in euro_to_usd.getCellRange(base_id='path')],
[
['currency_exchange_type/type_a', 'currency_exchange_type/type_b'],
['resource/%s' % euro.getRelativeUrl()],
['price_currency/%s' % usd.getRelativeUrl()],
]
)
type_a_cell = euro_to_usd.getCell( type_a_cell = euro_to_usd.getCell(
'currency_exchange_type/type_a', 'currency_exchange_type/type_a',
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,13 +37,7 @@ class BaseVariantMovementGroup(MovementGroup): ...@@ -37,13 +37,7 @@ class BaseVariantMovementGroup(MovementGroup):
portal_type = 'Base Variant Movement Group' portal_type = 'Base Variant Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} return {'_base_category_list': sorted(movement.getVariationBaseCategoryList() or [])}
category_list = movement.getVariationBaseCategoryList()
if category_list is None:
category_list = []
category_list.sort()
property_dict['_base_category_list'] = category_list
return property_dict
def test(self, document, property_dict, **kw): def test(self, document, property_dict, **kw):
# This movement group does not affect updating. # This movement group does not affect updating.
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
from collections import OrderedDict
from erp5.component.document.PropertyMovementGroup import PropertyMovementGroup from erp5.component.document.PropertyMovementGroup import PropertyMovementGroup
class CategoryMovementGroup(PropertyMovementGroup): class CategoryMovementGroup(PropertyMovementGroup):
...@@ -43,7 +44,7 @@ class CategoryMovementGroup(PropertyMovementGroup): ...@@ -43,7 +44,7 @@ class CategoryMovementGroup(PropertyMovementGroup):
portal_type = 'Category Movement Group' portal_type = 'Category Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} property_dict = OrderedDict()
getProperty = movement.getProperty getProperty = movement.getProperty
for prop in self.getTestedPropertyList(): for prop in self.getTestedPropertyList():
list_prop = prop + '_list' list_prop = prop + '_list'
......
...@@ -38,10 +38,7 @@ class CausalityMovementGroup(MovementGroup): ...@@ -38,10 +38,7 @@ class CausalityMovementGroup(MovementGroup):
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} return {'_explanation': self._getExplanationRelativeUrl(movement)}
explanation_relative_url = self._getExplanationRelativeUrl(movement)
property_dict['_explanation'] = explanation_relative_url
return property_dict
def test(self, movement, property_dict, **kw): def test(self, movement, property_dict, **kw):
# we don't care the difference of explanation url when updating # we don't care the difference of explanation url when updating
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
# #
############################################################################## ##############################################################################
from collections import OrderedDict
from erp5.component.document.MovementGroup import MovementGroup from erp5.component.document.MovementGroup import MovementGroup
from DateTime import DateTime from DateTime import DateTime
from erp5.component.module.DateUtils import atTheEndOfPeriod from erp5.component.module.DateUtils import atTheEndOfPeriod
...@@ -45,7 +46,7 @@ class MonthlyRangeMovementGroup(MovementGroup): ...@@ -45,7 +46,7 @@ class MonthlyRangeMovementGroup(MovementGroup):
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
"""Gather start_date and stop_date, converge them to the end of month. """Gather start_date and stop_date, converge them to the end of month.
""" """
property_dict = {} property_dict = OrderedDict()
for property_name in self.getTestedPropertyList() or ('start_date', 'stop_date'): for property_name in self.getTestedPropertyList() or ('start_date', 'stop_date'):
date = movement.getProperty(property_name, None) date = movement.getProperty(property_name, None)
if date is not None: if date is not None:
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
from collections import OrderedDict
from erp5.component.document.PropertyMovementGroup import PropertyMovementGroup from erp5.component.document.PropertyMovementGroup import PropertyMovementGroup
from Products.ERP5Type.Utils import UpperCase from Products.ERP5Type.Utils import UpperCase
...@@ -41,7 +42,7 @@ class ParentDeliveryPropertyMovementGroup(PropertyMovementGroup): ...@@ -41,7 +42,7 @@ class ParentDeliveryPropertyMovementGroup(PropertyMovementGroup):
portal_type = 'Parent Delivery Property Movement Group' portal_type = 'Parent Delivery Property Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} property_dict = OrderedDict()
parent_delivery = self._getParentDelivery(movement) parent_delivery = self._getParentDelivery(movement)
if parent_delivery is not None: if parent_delivery is not None:
for prop in self.getTestedPropertyList(): for prop in self.getTestedPropertyList():
......
...@@ -40,10 +40,7 @@ class ParentExplanationMovementGroup(MovementGroup): ...@@ -40,10 +40,7 @@ class ParentExplanationMovementGroup(MovementGroup):
portal_type = 'Parent Explanation Movement Group' portal_type = 'Parent Explanation Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} return {'parent_explanation_value': movement.getParentExplanationValue()}
parent_explanation_value = movement.getParentExplanationValue()
property_dict['parent_explanation_value'] = parent_explanation_value
return property_dict
def test(self, document, property_dict, **kw): def test(self, document, property_dict, **kw):
if document.getParentExplanationValue() == \ if document.getParentExplanationValue() == \
......
...@@ -26,8 +26,10 @@ ...@@ -26,8 +26,10 @@
# #
############################################################################## ##############################################################################
from collections import OrderedDict
from erp5.component.document.MovementGroup import MovementGroup from erp5.component.document.MovementGroup import MovementGroup
class PropertyMovementGroup(MovementGroup): class PropertyMovementGroup(MovementGroup):
""" """
The purpose of MovementGroup is to define how movements are grouped, The purpose of MovementGroup is to define how movements are grouped,
...@@ -40,7 +42,7 @@ class PropertyMovementGroup(MovementGroup): ...@@ -40,7 +42,7 @@ class PropertyMovementGroup(MovementGroup):
portal_type = 'Property Movement Group' portal_type = 'Property Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} property_dict = OrderedDict()
getProperty = movement.getProperty getProperty = movement.getProperty
for prop in self.getTestedPropertyList(): for prop in self.getTestedPropertyList():
property_dict[prop] = getProperty(prop) property_dict[prop] = getProperty(prop)
......
...@@ -36,7 +36,7 @@ class RequirementMovementGroup(MovementGroup): ...@@ -36,7 +36,7 @@ class RequirementMovementGroup(MovementGroup):
portal_type = 'Requirement Movement Group' portal_type = 'Requirement Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
return {'requirement':self._getRequirementList(movement)} return {'requirement': self._getRequirementList(movement)}
def test(self, movement, property_dict, **kw): def test(self, movement, property_dict, **kw):
# We can always update # We can always update
......
...@@ -39,10 +39,7 @@ class RootAppliedRuleCausalityMovementGroup(MovementGroup): ...@@ -39,10 +39,7 @@ class RootAppliedRuleCausalityMovementGroup(MovementGroup):
portal_type = 'Root Applied Rule Causality Movement Group' portal_type = 'Root Applied Rule Causality Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} return {'root_causality_value_list': [self._getRootCausalityValue(movement)]}
root_causality_value = self._getRootCausalityValue(movement)
property_dict['root_causality_value_list'] = [root_causality_value]
return property_dict
def test(self, movement, property_dict, **kw): def test(self, movement, property_dict, **kw):
# We can always update # We can always update
......
...@@ -37,9 +37,7 @@ class TitleMovementGroup(MovementGroup): ...@@ -37,9 +37,7 @@ class TitleMovementGroup(MovementGroup):
portal_type = 'Title Movement Group' portal_type = 'Title Movement Group'
def _getPropertyDict(self, movement, **kw): def _getPropertyDict(self, movement, **kw):
property_dict = {} return {'title': self._getTitle(movement)}
property_dict['title'] = self._getTitle(movement)
return property_dict
def test(self, document, property_dict, **kw): def test(self, document, property_dict, **kw):
# If title is different, we want to update existing document instead # If title is different, we want to update existing document instead
......
...@@ -331,8 +331,6 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -331,8 +331,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# 'variation_category' or 'variation_property' pseudo properties, # 'variation_category' or 'variation_property' pseudo properties,
# which rely on the resource being set to discover which # which rely on the resource being set to discover which
# categories/properties to set # categories/properties to set
# XXX-Leo: in the future: using an ordered_dict would be nice,
# but this would have to be respected on Base._edit()
edit_order = [] edit_order = []
property_dict = {'edit_order': edit_order} property_dict = {'edit_order': edit_order}
for d in property_dict_list: for d in property_dict_list:
......
currency_exchange_type_list = context.portal_categories.currency_exchange_type.getCategoryChildRelativeUrlList() currency_exchange_type_list = context.portal_categories.currency_exchange_type.getCategoryChildRelativeUrlList(
local_sort_id=("int_index", "title"))
resource_list = ['resource/%s' % context.getParentValue().getRelativeUrl()] resource_list = ['resource/%s' % context.getParentValue().getRelativeUrl()]
price_currency_list = [context.getPriceCurrency(base=True)] price_currency_list = [context.getPriceCurrency(base=True)]
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>after_script/portal_workflow/movement_resource_interaction_workflow/script_Movement_copyBaseContributionFromResource</string> <string>after_script/portal_workflow/movement_resource_interaction_workflow/script_Movement_copyCategoryListFromResource</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>interaction_setBaseContribution</string> </value> <value> <string>interaction_setResource</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_Movement_copyBaseContributionFromResource</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,6 +2,22 @@ movement = state_change['object'] ...@@ -2,6 +2,22 @@ movement = state_change['object']
resource = movement.getResourceValue() resource = movement.getResourceValue()
if resource is not None: if resource is not None:
# quantity unit can be acquired from resource (see Amount.getQuantityUnit)
# we check that it's really set on the movement.
if movement.hasQuantityUnit():
# if the movement already have a quantity unit which is valid for this resource, don't change it
if movement.getQuantityUnit() not in resource.getQuantityUnitList():
movement.setQuantityUnit(resource.getDefaultQuantityUnit())
else:
# initialise to the default quantity unit
movement.setQuantityUnit(resource.getDefaultQuantityUnit())
# if the movement already have a use which is valid for this resource, don't change it.
# ( unlike quantity unit, use is not acquired )
if movement.getUse() not in resource.getUseList():
# otherwise initialise to the default use
movement.setUse(resource.getDefaultUse())
# We can over-write base contribution list always. # We can over-write base contribution list always.
# Because when we change the resource, we need to set all the base contribution into movement. # Because when we change the resource, we need to set all the base contribution into movement.
# Imagine that we buy a product which have complex tax definitions with discounting. # Imagine that we buy a product which have complex tax definitions with discounting.
......
...@@ -60,9 +60,15 @@ ...@@ -60,9 +60,15 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>script_Movement_copyQuantityUnitFromResource</string> </value> <value> <string>script_Movement_copyCategoryListFromResource</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
......
movement = state_change['object']
resource = movement.getResourceValue()
if resource is not None:
# quantity unit can be acquired from resource.
# (Amount class has getQuantityUnit method for backward compatibility and it tries to acquire value from resource).
if movement.hasCategory('quantity_unit'):
# if the movement already have a quantity unit which is valid for this resource, don't change it
movement_quantity_unit = movement.getQuantityUnit()
if movement_quantity_unit and movement_quantity_unit in resource.getQuantityUnitList():
return
# otherwise initialise to the default quantity unit
movement.setQuantityUnit(resource.getDefaultQuantityUnit())
movement = state_change['object']
resource = movement.getResourceValue()
if resource is not None:
# if the movement already have a use which is valid for this resource, don't change it
movement_use = movement.getUse()
if movement_use and movement_use in resource.getUseList():
return
# otherwise initialise to the default use
movement.setUse(resource.getDefaultUse())
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Form.AudioField import AudioField from Products.ERP5Form.AudioField import AudioField
from Products.ERP5Type.tests.utils import canonical_html
class TestAudioField(ERP5TypeTestCase): class TestAudioField(ERP5TypeTestCase):
...@@ -44,9 +45,10 @@ class TestAudioField(ERP5TypeTestCase): ...@@ -44,9 +45,10 @@ class TestAudioField(ERP5TypeTestCase):
def test_render_view(self): def test_render_view(self):
self.field.values['default'] = 'Audio content' self.field.values['default'] = 'Audio content'
self.assertEqual('<audio preload="preload" src="Audio content" ' + self.assertEqual(
'controls="controls" >Your browser does not ' + canonical_html(self.field.render_view(value='Audio content')),
'support audio tag.</audio>', self.field.render_view(value='Audio content')) '<audio controls="controls" preload="preload" src="Audio content"'
+ '>Your browser does not support audio tag.</audio>',)
self.field.values['audio_preload'] = False self.field.values['audio_preload'] = False
self.field.values['audio_loop'] = True self.field.values['audio_loop'] = True
...@@ -54,13 +56,7 @@ class TestAudioField(ERP5TypeTestCase): ...@@ -54,13 +56,7 @@ class TestAudioField(ERP5TypeTestCase):
self.field.values['audio_autoplay'] = True self.field.values['audio_autoplay'] = True
self.field.values['audio_error_message'] = 'Another error message' self.field.values['audio_error_message'] = 'Another error message'
self.assertEqual('<audio src="Another Audio content" ' + self.assertEqual(
'loop="loop" autoplay="autoplay" >Another error ' + canonical_html(self.field.render_view(value='Another Audio content')),
'message</audio>', self.field.render_view(value='Another Audio content')) '<audio autoplay="autoplay" loop="loop" src="Another Audio content"'
+ '>Another error message</audio>')
import unittest
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestAudioField))
return suite
...@@ -368,13 +368,9 @@ return result ...@@ -368,13 +368,9 @@ return result
py_script_obj = getattr(portal, python_script_id) py_script_obj = getattr(portal, python_script_id)
py_script_params = "value=10000, long_parameter=''" py_script_params = "value=10000, long_parameter=''"
py_script_body = """ py_script_body = """
import time
def veryExpensiveMethod(value): def veryExpensiveMethod(value):
# do something expensive for some time time.sleep(1)
# no 'time.sleep()' available in Zope
# so concatenate strings
s = ''
for i in range(0, value):
s = str(value * value * value) + s
return value return value
veryExpensiveMethod(value) veryExpensiveMethod(value)
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
import collections
import pprint import pprint
import httplib import httplib
import urlparse import urlparse
...@@ -206,9 +207,15 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -206,9 +207,15 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
actions = self.portal.portal_actions.listFilteredActionsFor(target) actions = self.portal.portal_actions.listFilteredActionsFor(target)
got = {} got = {}
for category, actions in actions.items(): for category, actions in actions.items():
actions_by_priority = collections.defaultdict(list)
got[category] = [dict(title=action['title'], id=action['id']) got[category] = [dict(title=action['title'], id=action['id'])
for action in actions for action in actions
if action['visible']] if action['visible']]
for action in actions:
actions_by_priority[action['priority']].append(actions)
for actions in actions_by_priority.values():
if len(actions) > 1:
self.assertFalse(actions) # no actions with same priority
msg = ("Actions do not match. Expected:\n%s\n\nGot:\n%s\n" % msg = ("Actions do not match. Expected:\n%s\n\nGot:\n%s\n" %
(pprint.pformat(expected), pprint.pformat(got))) (pprint.pformat(expected), pprint.pformat(got)))
self.assertEqual(expected, got, msg) self.assertEqual(expected, got, msg)
...@@ -222,8 +229,6 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -222,8 +229,6 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
'id': 'category_tool'}, 'id': 'category_tool'},
{'title': 'Manage Callables', {'title': 'Manage Callables',
'id': 'callable_tool'}, 'id': 'callable_tool'},
{'title': 'Create Module',
'id': 'create_module'},
{'title': 'Configure Portal Types', {'title': 'Configure Portal Types',
'id': 'types_tool'}, 'id': 'types_tool'},
{'id': 'property_sheet_tool', {'id': 'property_sheet_tool',
...@@ -232,7 +237,9 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -232,7 +237,9 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
'title': 'Configure Portal Catalog'}, 'title': 'Configure Portal Catalog'},
{'id': 'portal_alarms_action', {'id': 'portal_alarms_action',
'title': 'Configure Alarms'}, 'title': 'Configure Alarms'},
{'title': 'Undo', 'id': 'undo'}], {'title': 'Undo', 'id': 'undo'},
{'title': 'Create Module',
'id': 'create_module'},],
'object': [], 'object': [],
'object_action': [{'id': 'diff_object_action', 'title': 'Diff Object'}], 'object_action': [{'id': 'diff_object_action', 'title': 'Diff Object'}],
'object_exchange': [{'id': 'csv_export', 'title': 'Export Csv File'}, # erp5_csv_style 'object_exchange': [{'id': 'csv_export', 'title': 'Export Csv File'}, # erp5_csv_style
......
...@@ -740,7 +740,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -740,7 +740,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# the list. # the list.
self.assertEqual(person.getDefaultRegion(), 'beta') self.assertEqual(person.getDefaultRegion(), 'beta')
person.setRegionSet(['alpha', 'beta', 'alpha']) person.setRegionSet(['alpha', 'beta', 'alpha'])
self.assertEqual(person.getRegionList(), ['beta', 'alpha']) self.assertEqual(sorted(person.getRegionList()), ['alpha', 'beta'])
# calling a set setter did not change the default region # calling a set setter did not change the default region
self.assertEqual(person.getDefaultRegion(), 'beta') self.assertEqual(person.getDefaultRegion(), 'beta')
...@@ -2185,6 +2185,10 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -2185,6 +2185,10 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
checked_permission=checked_permission) checked_permission=checked_permission)
self.assertSameSet([beta_path, gamma_path], foo.getRegionList()) self.assertSameSet([beta_path, gamma_path], foo.getRegionList())
foo.setRegionList([beta_path])
foo.setRegionSet([gamma_path, beta_path])
self.assertEqual(foo.getRegionList(), [beta_path, gamma_path])
foo.setRegionValue(None) foo.setRegionValue(None)
self.assertEqual(None, foo.getRegion()) self.assertEqual(None, foo.getRegion())
# Check setCategoryValueSet accessor # Check setCategoryValueSet accessor
...@@ -2199,6 +2203,10 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -2199,6 +2203,10 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
checked_permission=checked_permission) checked_permission=checked_permission)
self.assertSameSet([beta_path, gamma_path], foo.getRegionList()) self.assertSameSet([beta_path, gamma_path], foo.getRegionList())
foo.setRegionValueList([beta])
foo.setRegionValueSet([gamma, beta])
self.assertEqual(foo.getRegionValueList(), [beta, gamma])
# check hasCategory accessors # check hasCategory accessors
foo.setRegionValue(None) foo.setRegionValue(None)
self.assertEqual(None, foo.getRegion()) self.assertEqual(None, foo.getRegion())
...@@ -2385,6 +2393,18 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -2385,6 +2393,18 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
self.assertEqual('Could not get object region/gamma', self.assertEqual('Could not get object region/gamma',
logged_errors[0].getMessage()) logged_errors[0].getMessage())
def test_portal_type_property_sheet_have_priority_over_class_property_sheet(self):
self._addProperty(
'Person',
self.id(),
'first_name',
elementary_type='string',
property_default='string:property sheet default',
portal_type='Standard Property',
)
obj = self.getPersonModule().newContent(portal_type='Person')
self.assertEqual(obj.getFirstName(), 'property sheet default')
def test_list_accessors(self): def test_list_accessors(self):
self._addProperty('Person', 'test_list_accessors', 'dummy', self._addProperty('Person', 'test_list_accessors', 'dummy',
elementary_type='lines', elementary_type='lines',
...@@ -2406,12 +2426,23 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -2406,12 +2426,23 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
person.setDummyList(['a', 'b']) person.setDummyList(['a', 'b'])
self.assertEqual(person.getDummy(), 'a') self.assertEqual(person.getDummy(), 'a')
self.assertEqual(person.getDummyList(), ['a', 'b']) self.assertEqual(person.getDummyList(), ['a', 'b'])
self.assertEqual(person.getDummySet(), ['a', 'b']) self.assertEqual(sorted(person.getDummySet()), ['a', 'b'])
person.setDummySet(['b', 'a', 'c'])
self.assertEqual(person.getDummy(), 'a')
self.assertEqual(sorted(person.getDummyList()), ['a', 'b', 'c'])
person.setDummySet(['b', 'c'])
self.assertEqual(sorted(person.getDummyList()), ['b', 'c'])
person.setDummyList(['a', 'b', 'b'])
self.assertEqual(person.getDummy(), 'a')
self.assertEqual(person.getDummyList(), ['a', 'b', 'b'])
self.assertEqual(sorted(person.getDummySet()), ['a', 'b'])
person.setDummy('value') person.setDummy('value')
self.assertEqual(person.getDummy(), 'value') self.assertEqual(person.getDummy(), 'value')
self.assertEqual(person.getDummyList(), ['value']) self.assertEqual(person.getDummyList(), ['value'])
self.assertEqual(person.getDummySet(), ['value']) self.assertEqual(sorted(person.getDummySet()), ['value'])
def test_translated_accessors(self): def test_translated_accessors(self):
self._addProperty('Person', self._addProperty('Person',
...@@ -3335,6 +3366,13 @@ def test_suite(): ...@@ -3335,6 +3366,13 @@ def test_suite():
pass pass
else: else:
import ZPublisher.tests.test_WSGIPublisher import ZPublisher.tests.test_WSGIPublisher
# TestLoadApp tests are confused because running as a live test interfere with
# transaction system. Aborting the transaction at beginning of test seems OK.
TestLoadApp_setUp = ZPublisher.tests.test_WSGIPublisher.TestLoadApp.setUp
def setUp(self):
TestLoadApp_setUp(self)
transaction.abort()
ZPublisher.tests.test_WSGIPublisher.TestLoadApp.setUp = setUp
add_tests(suite, ZPublisher.tests.test_WSGIPublisher) add_tests(suite, ZPublisher.tests.test_WSGIPublisher)
import ZPublisher.tests.test_mapply import ZPublisher.tests.test_mapply
......
...@@ -45,7 +45,7 @@ from Products.ERP5Form.CaptchaField import CaptchaField ...@@ -45,7 +45,7 @@ from Products.ERP5Form.CaptchaField import CaptchaField
from Products.ERP5Form.EditorField import EditorField from Products.ERP5Form.EditorField import EditorField
from Products.Formulator.MethodField import Method from Products.Formulator.MethodField import Method
from Products.Formulator.TALESField import TALESMethod from Products.Formulator.TALESField import TALESMethod
from Products.ERP5Type.tests.utils import canonical_html
from Products.ERP5Type.Core.Folder import Folder from Products.ERP5Type.Core.Folder import Folder
from Products.ERP5Form.Form import field_value_cache from Products.ERP5Form.Form import field_value_cache
from Products.ERP5Form.Form import getFieldValue from Products.ERP5Form.Form import getFieldValue
...@@ -1180,8 +1180,11 @@ class TestCaptchaField(ERP5TypeTestCase): ...@@ -1180,8 +1180,11 @@ class TestCaptchaField(ERP5TypeTestCase):
def test_numeric_good_captcha(self): def test_numeric_good_captcha(self):
self.field.values['captcha_type'] = 'numeric' self.field.values['captcha_type'] = 'numeric'
def random_choice(seq):
self.assertIn('+', seq)
return '+'
with mock.patch('Products.ERP5Form.CaptchaField.random.randint', return_value=1), \ with mock.patch('Products.ERP5Form.CaptchaField.random.randint', return_value=1), \
mock.patch('Products.ERP5Form.CaptchaField.random.choice', side_effect=lambda seq: seq[0]): mock.patch('Products.ERP5Form.CaptchaField.random.choice', side_effect=random_choice):
field_html = self.field.render(REQUEST=self.portal.REQUEST) field_html = self.field.render(REQUEST=self.portal.REQUEST)
self.assertIn('1 plus 1', field_html) self.assertIn('1 plus 1', field_html)
self.assertIn(hashlib.md5(b'1 + 1').hexdigest(), field_html) self.assertIn(hashlib.md5(b'1 + 1').hexdigest(), field_html)
...@@ -1197,8 +1200,11 @@ class TestCaptchaField(ERP5TypeTestCase): ...@@ -1197,8 +1200,11 @@ class TestCaptchaField(ERP5TypeTestCase):
def test_numeric_bad_captcha(self): def test_numeric_bad_captcha(self):
self.field.values['captcha_type'] = 'numeric' self.field.values['captcha_type'] = 'numeric'
def random_choice(seq):
self.assertIn('+', seq)
return '+'
with mock.patch('Products.ERP5Form.CaptchaField.random.randint', return_value=1), \ with mock.patch('Products.ERP5Form.CaptchaField.random.randint', return_value=1), \
mock.patch('Products.ERP5Form.CaptchaField.random.choice', side_effect=lambda seq: seq[0]): mock.patch('Products.ERP5Form.CaptchaField.random.choice', side_effect=random_choice):
self.field.render(REQUEST=self.portal.REQUEST) self.field.render(REQUEST=self.portal.REQUEST)
self.assertRaises( self.assertRaises(
ValidationError, self.validator.validate, self.field, 'field_test', { ValidationError, self.validator.validate, self.field, 'field_test', {
...@@ -1269,8 +1275,8 @@ class TestEditorField(ERP5TypeTestCase): ...@@ -1269,8 +1275,8 @@ class TestEditorField(ERP5TypeTestCase):
def test_render_editable_textarea(self): def test_render_editable_textarea(self):
self.field.values['default'] = 'value' self.field.values['default'] = 'value'
self.assertEqual( self.assertEqual(
self.field.render(REQUEST=self.portal.REQUEST), canonical_html(self.field.render(REQUEST=self.portal.REQUEST)),
'<textarea rows="5" cols="40" name="field_test_field" >\nvalue</textarea>') '<textarea cols="40" name="field_test_field" rows="5">\nvalue</textarea>')
def test_render_editable_textarea_REQUEST(self): def test_render_editable_textarea_REQUEST(self):
self.field.values['default'] = 'default value' self.field.values['default'] = 'default value'
...@@ -1279,8 +1285,8 @@ class TestEditorField(ERP5TypeTestCase): ...@@ -1279,8 +1285,8 @@ class TestEditorField(ERP5TypeTestCase):
self.field.generate_field_key(key=self.field.id) self.field.generate_field_key(key=self.field.id)
] = 'user <value>' ] = 'user <value>'
self.assertEqual( self.assertEqual(
self.field.render(REQUEST=self.portal.REQUEST), canonical_html(self.field.render(REQUEST=self.portal.REQUEST)),
'<textarea rows="5" cols="40" name="field_test_field" >\nuser &lt;value&gt;</textarea>') '<textarea cols="40" name="field_test_field" rows="5">\nuser &lt;value&gt;</textarea>')
def test_render_non_editable_textarea(self): def test_render_non_editable_textarea(self):
self.field.values['default'] = '<not &scaped' self.field.values['default'] = '<not &scaped'
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Form.VideoField import VideoField from Products.ERP5Form.VideoField import VideoField
from Products.ERP5Type.tests.utils import canonical_html
class TestVideoField(ERP5TypeTestCase): class TestVideoField(ERP5TypeTestCase):
"""Tests Video field """Tests Video field
...@@ -43,8 +45,11 @@ class TestVideoField(ERP5TypeTestCase): ...@@ -43,8 +45,11 @@ class TestVideoField(ERP5TypeTestCase):
def test_render_view(self): def test_render_view(self):
self.field.values['default'] = 'Video content' self.field.values['default'] = 'Video content'
self.assertEqual('<video preload="auto" src="Video content" controls="controls" height="85" width="160" >Your browser does not support video tag.</video>', \ self.assertEqual(
self.field.render_view(value='Video content')) canonical_html(self.field.render_view(value='Video content')),
'<video controls="controls" height="85" preload="auto" src="Video content"'
+ ' width="160">Your browser does not support video tag.</video>',
)
self.field.values['video_preload'] = False self.field.values['video_preload'] = False
self.field.values['video_loop'] = True self.field.values['video_loop'] = True
...@@ -54,14 +59,9 @@ class TestVideoField(ERP5TypeTestCase): ...@@ -54,14 +59,9 @@ class TestVideoField(ERP5TypeTestCase):
self.field.values['video_height'] = 800 self.field.values['video_height'] = 800
self.field.values['video_width'] = 1280 self.field.values['video_width'] = 1280
self.assertEqual('<video src="Another Video content" ' +
'height="800" width="1280" loop="loop" autoplay="autoplay" ' +
'>Another error message</video>', \
self.field.render_view(value='Another Video content'))
import unittest
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVideoField))
return suite
self.assertEqual(
canonical_html(self.field.render_view(value='Another Video content')),
'<video autoplay="autoplay" height="800" loop="loop"'
+ ' src="Another Video content" width="1280">Another error message</video>'
)
...@@ -255,6 +255,34 @@ class TestWorklist(TestWorkflowMixin): ...@@ -255,6 +255,34 @@ class TestWorklist(TestWorkflowMixin):
self.worklist_int_variable_id, self.worklist_int_variable_id,
]) ])
def test_edit_worklist_view(self):
"""Checks we can view and edit worklist.
"""
def check_visible(worklist):
self.clearCache()
worklist.view()
workflow_value = self.getWorkflowTool()[self.checked_workflow]
# edit reference first
worklist_value = workflow_value.newContent(portal_type='Worklist')
check_visible(worklist_value)
worklist_value.setReference(self.worklist_assignor_id)
check_visible(worklist_value)
worklist_value.setActionName('Test (%(count)s)')
worklist_value.setAction('/')
worklist_value.setActionType('global')
check_visible(worklist_value)
# edit reference last
worklist_value = workflow_value.newContent(portal_type='Worklist')
check_visible(worklist_value)
worklist_value.setActionName('Test (%(count)s)')
worklist_value.setAction('/')
worklist_value.setActionType('global')
check_visible(worklist_value)
worklist_value.setReference(self.worklist_owner_id)
check_visible(worklist_value)
def test_01_permission(self, quiet=0, run=run_all_test): def test_01_permission(self, quiet=0, run=run_all_test):
""" """
Test the permission of the building module. Test the permission of the building module.
......
import json import json
return ['test report %s' % json.dumps(kw)] return ['test report %s' % json.dumps(kw, sort_keys=True)]
...@@ -206,11 +206,11 @@ class TestCorporateIdentityMethod(ERP5TypeTestCase): ...@@ -206,11 +206,11 @@ class TestCorporateIdentityMethod(ERP5TypeTestCase):
# it has no matter with/without follow up # it has no matter with/without follow up
doc_content = '<div> <a href="sale_opportunity_module/template_test_embed_sale_opportunity?report=Base_generateCorporareIdentityTestReport&amp;test=23"></a> </div>' doc_content = '<div> <a href="sale_opportunity_module/template_test_embed_sale_opportunity?report=Base_generateCorporareIdentityTestReport&amp;test=23"></a> </div>'
output =web_page_with_follow_up.WebPage_embedReportDocumentList(doc_content) output =web_page_with_follow_up.WebPage_embedReportDocumentList(doc_content)
self.assertEqual(output, '<div> test report {"test": "23", "document_language": null, "format": null} </div>') self.assertEqual(output, '<div> test report {"document_language": null, "format": null, "test": "23"} </div>')
doc_content = '<div> <a href="sale_opportunity_module/template_test_embed_sale_opportunity?report=Base_generateCorporareIdentityTestReport&amp;test=23"></a> </div>' doc_content = '<div> <a href="sale_opportunity_module/template_test_embed_sale_opportunity?report=Base_generateCorporareIdentityTestReport&amp;test=23"></a> </div>'
output =web_page_no_follow_up.WebPage_embedReportDocumentList(doc_content) output =web_page_no_follow_up.WebPage_embedReportDocumentList(doc_content)
self.assertEqual(output, '<div> test report {"test": "23", "document_language": null, "format": null} </div>') self.assertEqual(output, '<div> test report {"document_language": null, "format": null, "test": "23"} </div>')
def test_getTemplateProxyParameter_override_person(self): def test_getTemplateProxyParameter_override_person(self):
output_dict_list = self.test_person.Base_getTemplateProxyParameter( output_dict_list = self.test_person.Base_getTemplateProxyParameter(
......
...@@ -392,39 +392,37 @@ import sys ...@@ -392,39 +392,37 @@ import sys
Test the fucntioning of the ERP5ImageProcessor and the custom system Test the fucntioning of the ERP5ImageProcessor and the custom system
display hook too. display hook too.
""" """
self.image_module = self.portal.getDefaultModule('Image')
self.assertTrue(self.image_module is not None)
# Create a new ERP5 image object # Create a new ERP5 image object
reference = 'testBase_displayImageReference5' reference = 'testBase_displayImageReference5'
data_template = '<img src="data:application/unknown;base64,%s" /><br />' data_template = '<img src="data:image/png;base64,%s"'
data = 'qwertyuiopasdfghjklzxcvbnm<somerandomcharacterstosaveasimagedata>' data = bytes(self.portal.restrictedTraverse('images/erp5_logo.png').data)
if getattr(self.image_module, 'testBase_displayImageID5', None) is not None: img = self.portal.image_module.newContent(
self.image_module.manage_delObjects(ids=['testBase_displayImageID5'])
self.image_module.newContent(
portal_type='Image', portal_type='Image',
id='testBase_displayImageID5', id=self.id(),
reference=reference, reference=reference,
data=data, data=data,
filename='test.png' filename='test.png'
) )
def cleanup():
self.portal.image_module.manage_delObjects(ids=[img.getId()])
self.tic()
self.addCleanup(cleanup)
self.tic() self.tic()
# Call Base_displayImage from inside of Base_runJupyter # Call Base_displayImage from inside of Base_runJupyter
jupyter_code = """ jupyter_code = """
image = context.portal_catalog.getResultValue(portal_type='Image',reference='%s') image = context.portal_catalog.getResultValue(portal_type='Image',reference='%s')
context.Base_renderAsHtml(image) context.Base_renderAsHtml(image)
"""%reference """ % reference
notebook_context = {'setup' : {}, 'variables' : {}} notebook_context = {'setup': {}, 'variables': {}}
result = self.portal.Base_runJupyter( result = self.portal.Base_runJupyter(
jupyter_code=jupyter_code, jupyter_code=jupyter_code,
old_notebook_context=notebook_context old_notebook_context=notebook_context
) )
self.assertIn((data_template % base64.b64encode(data).decode()), result['result_string'])
self.assertIn((data_template % base64.b64encode(data)), result['result_string']) self.assertEqual(result['mime_type'], 'text/html')
# Mime_type shouldn't be image/png just because of filename, instead it is self.assertEqual(result['status'], 'ok')
# dependent on file and file data
self.assertNotEqual(result['mime_type'], 'image/png')
def testImportSameModuleDifferentNamespace(self): def testImportSameModuleDifferentNamespace(self):
""" """
...@@ -436,7 +434,7 @@ context.Base_renderAsHtml(image) ...@@ -436,7 +434,7 @@ context.Base_renderAsHtml(image)
# First we execute a jupyter_code which imports sys module as 'ss' namespace # First we execute a jupyter_code which imports sys module as 'ss' namespace
jupyter_code = "import sys as ss" jupyter_code = "import sys as ss"
reference = 'Test.Notebook.MutlipleImports %s' %time.time() reference = 'Test.Notebook.MutlipleImports %s' % time.time()
portal.Base_executeJupyter( portal.Base_executeJupyter(
reference=reference, reference=reference,
python_expression=jupyter_code python_expression=jupyter_code
......
...@@ -60,11 +60,17 @@ ...@@ -60,11 +60,17 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_tree</string> </key> <key> <string>_mt_index</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value>
...@@ -100,4 +106,12 @@ ...@@ -100,4 +106,12 @@
<none/> <none/>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -60,11 +60,17 @@ ...@@ -60,11 +60,17 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_tree</string> </key> <key> <string>_mt_index</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value>
...@@ -100,4 +106,12 @@ ...@@ -100,4 +106,12 @@
<none/> <none/>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -13,11 +13,17 @@ ...@@ -13,11 +13,17 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_tree</string> </key> <key> <string>_mt_index</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value>
...@@ -49,4 +55,12 @@ ...@@ -49,4 +55,12 @@
<none/> <none/>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData> </ZopeData>
# encoding: utf-8
dqe_resource_category = context.getPortalObject().portal_categories.http_exchange_resource.dqe dqe_resource_category = context.getPortalObject().portal_categories.http_exchange_resource.dqe
# Values are hard-coded to fr, it is for Data Warehouse use and Investigation tab # Values are hard-coded to fr, it is for Data Warehouse use and Investigation tab
return { return {
......
# encoding: utf-8
resource_value = context.getResourceValue() resource_value = context.getResourceValue()
if not resource_value.isMemberOf('http_exchange_resource/dqe'): if not resource_value.isMemberOf('http_exchange_resource/dqe'):
return {} return {}
......
...@@ -2,46 +2,64 @@ ...@@ -2,46 +2,64 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/> <global name="Workflow" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_objects</string> </key> <key> <string>_count</string> </key>
<value> <value>
<tuple/> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>creation_guard</string> </key> <key> <string>_mt_index</string> </key>
<value> <value>
<none/> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>_tree</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>groups</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source/portal_workflow/dqe_transaction_workflow/state_draft</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>default_reference</string> </key>
<value> <string>dqe_transaction_workflow</string> </value> <value> <string>dqe_transaction_workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>initial_state</string> </key> <key> <string>description</string> </key>
<value> <string>draft</string> </value> <value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>dqe_transaction_workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>manager_bypass</string> </key> <key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>permissions</string> </key> <key> <string>state_variable</string> </key>
<value> <string>simulation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>DQE Transaction Workflow</string> </value>
</item>
<item>
<key> <string>workflow_managed_permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Access contents information</string> <string>Access contents information</string>
...@@ -51,15 +69,29 @@ ...@@ -51,15 +69,29 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>state_var</string> </key>
<value> <string>simulation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>DQE Transaction Workflow</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData> </ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,40 +2,48 @@ ...@@ -2,40 +2,48 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <global name="Workflow State" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>acquire_permission</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>cancelled</string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>description</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Cancelled</string> </value> <value> <string>state_cancelled</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>state_permission_role_list_dict</string> </key>
<value> <value>
<tuple/> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>type_list</string> </key> <key> <string>state_type</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string>Cancelled</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -2,44 +2,52 @@ ...@@ -2,44 +2,52 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <global name="Workflow State" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>acquire_permission</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>confirmed</string> </value> <value>
<tuple>
<string>destination/portal_workflow/dqe_transaction_workflow/transition_cancel</string>
<string>destination/portal_workflow/dqe_transaction_workflow/transition_deliver</string>
<string>destination/portal_workflow/dqe_transaction_workflow/transition_start</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>description</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Confirmed</string> </value> <value> <string>state_confirmed</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>state_permission_role_list_dict</string> </key>
<value> <value>
<tuple> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<string>cancel</string>
<string>deliver</string>
<string>start</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>type_list</string> </key> <key> <string>state_type</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string>Confirmed</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -2,40 +2,48 @@ ...@@ -2,40 +2,48 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <global name="Workflow State" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>acquire_permission</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>delivered</string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>description</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Delivered</string> </value> <value> <string>state_delivered</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>state_permission_role_list_dict</string> </key>
<value> <value>
<tuple/> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>type_list</string> </key> <key> <string>state_type</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivered</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -2,42 +2,50 @@ ...@@ -2,42 +2,50 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <global name="Workflow State" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>acquire_permission</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>draft</string> </value> <value>
<tuple>
<string>destination/portal_workflow/dqe_transaction_workflow/transition_confirm</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>description</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Draft</string> </value> <value> <string>state_draft</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>state_permission_role_list_dict</string> </key>
<value> <value>
<tuple> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<string>confirm</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>type_list</string> </key> <key> <string>state_type</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string>Draft</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -2,42 +2,50 @@ ...@@ -2,42 +2,50 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <global name="Workflow State" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>acquire_permission</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>started</string> </value> <value>
<tuple>
<string>destination/portal_workflow/dqe_transaction_workflow/transition_deliver</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>description</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Started</string> </value> <value> <string>state_started</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>state_permission_role_list_dict</string> </key>
<value> <value>
<tuple> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<string>deliver</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>type_list</string> </key> <key> <string>state_type</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string>Started</string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -2,59 +2,70 @@ ...@@ -2,59 +2,70 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="Interaction Workflow Interaction" module="erp5.portal_type"/> <global name="Workflow Transition" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>categories</string> </key> <key> <string>action</string> </key>
<value> <value>
<tuple> <none/>
<string>after_script/portal_workflow/movement_resource_interaction_workflow/script_Movement_copyUseFromResource</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>action_name</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>interaction_setUse</string> </value> <value>
<tuple>
<string>action_type/workflow</string>
<string>destination/portal_workflow/dqe_transaction_workflow/state_cancelled</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>description</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>guard_group</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_group_filter</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>temporary_document_disallowed</string> </key> <key> <string>guard_role</string> </key>
<value> <int>0</int> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>trigger_method_id</string> </key> <key> <string>icon</string> </key>
<value> <value>
<tuple> <none/>
<string>_setResource.*</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>trigger_once_per_transaction</string> </key> <key> <string>id</string> </key>
<value> <int>1</int> </value> <value> <string>transition_cancel</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Cancel</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -2,51 +2,66 @@ ...@@ -2,51 +2,66 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> <global name="Workflow Transition" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>action</string> </key>
<value> <string>workflow</string> </value> <value>
</item> <none/>
<item> </value>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>action_name</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>categories</string> </key>
<value> <string></string> </value> <value>
<tuple>
<string>action_type/workflow</string>
<string>destination/portal_workflow/dqe_transaction_workflow/state_confirmed</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>guard_group</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <tuple>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>guard_role</string> </key>
<value> <string>confirm</string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>icon</string> </key>
<value> <string>confirmed</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>id</string> </key>
<value> <string></string> </value> <value> <string>transition_confirm</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -59,21 +74,4 @@ ...@@ -59,21 +74,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -2,51 +2,66 @@ ...@@ -2,51 +2,66 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> <global name="Workflow Transition" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>action</string> </key>
<value> <string>workflow</string> </value> <value>
</item> <none/>
<item> </value>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>action_name</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>categories</string> </key>
<value> <string></string> </value> <value>
<tuple>
<string>action_type/workflow</string>
<string>destination/portal_workflow/dqe_transaction_workflow/state_delivered</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>guard_group</string> </key>
<value> <string></string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <tuple>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>guard_role</string> </key>
<value> <string>deliver</string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>icon</string> </key>
<value> <string>delivered</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>id</string> </key>
<value> <string></string> </value> <value> <string>transition_deliver</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -59,21 +74,4 @@ ...@@ -59,21 +74,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -2,59 +2,70 @@ ...@@ -2,59 +2,70 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="Interaction Workflow Interaction" module="erp5.portal_type"/> <global name="Workflow Transition" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>categories</string> </key> <key> <string>action</string> </key>
<value> <value>
<tuple> <none/>
<string>after_script/portal_workflow/movement_resource_interaction_workflow/script_Movement_copyQuantityUnitFromResource</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>action_name</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>categories</string> </key>
<value> <string>interaction_setQuantityUnit</string> </value> <value>
<tuple>
<string>action_type/workflow</string>
<string>destination/portal_workflow/dqe_transaction_workflow/state_started</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>description</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>guard_group</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_group_filter</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>temporary_document_disallowed</string> </key> <key> <string>guard_role</string> </key>
<value> <int>0</int> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>trigger_method_id</string> </key> <key> <string>icon</string> </key>
<value> <value>
<tuple> <none/>
<string>_setResource.*</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>trigger_once_per_transaction</string> </key> <key> <string>id</string> </key>
<value> <int>1</int> </value> <value> <string>transition_start</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Start</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transitions" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transitions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cancel</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>cancelled</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>start</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>started</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Transition id</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variable_action</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</string> </key>
<value> <string>transition/getReference|nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,19 +2,13 @@ ...@@ -2,19 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> <global name="Workflow Variable" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>default_expr</string> </key> <key> <string>automatic_update</string> </key>
<value> <value> <int>1</int> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -25,34 +19,21 @@ ...@@ -25,34 +19,21 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>for_status</string> </key> <key> <string>id</string> </key>
<value> <int>1</int> </value> <value> <string>variable_actor</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>status_included</string> </key>
<value> <string>actor</string> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>info_guard</string> </key> <key> <string>title</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>update_always</string> </key> <key> <string>variable_default_expression</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>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -2,19 +2,13 @@ ...@@ -2,19 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> <global name="Workflow Variable" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>default_expr</string> </key> <key> <string>automatic_update</string> </key>
<value> <value> <int>1</int> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -25,34 +19,21 @@ ...@@ -25,34 +19,21 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>for_status</string> </key> <key> <string>id</string> </key>
<value> <int>1</int> </value> <value> <string>variable_comment</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>status_included</string> </key>
<value> <string>comment</string> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>info_guard</string> </key> <key> <string>title</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>update_always</string> </key> <key> <string>variable_default_expression</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>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Error message if validation failed</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variable_error_message</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,19 +2,13 @@ ...@@ -2,19 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> <global name="Workflow Variable" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>default_expr</string> </key> <key> <string>automatic_update</string> </key>
<value> <value> <int>0</int> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -25,34 +19,21 @@ ...@@ -25,34 +19,21 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>for_status</string> </key> <key> <string>id</string> </key>
<value> <int>0</int> </value> <value> <string>variable_history</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>status_included</string> </key>
<value> <string>history</string> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>info_guard</string> </key> <key> <string>title</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>update_always</string> </key> <key> <string>variable_default_expression</string> </key>
<value> <int>0</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>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Portal type (used as filter for worklists)</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variable_portal_type</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Transition timestamp</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variable_time</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</string> </key>
<value> <string>state_change/getDateTime</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_system_event erp5_system_event
erp5_web_service
erp5_credential
\ No newline at end of file
...@@ -74,4 +74,7 @@ class_definition = { ...@@ -74,4 +74,7 @@ class_definition = {
} }
} }
return json.dumps(dict(graph=getBusinessProcessGraph(context), class_definition=class_definition), indent=2) return json.dumps(
dict(graph=getBusinessProcessGraph(context), class_definition=class_definition),
sort_keys=True,
indent=2)
...@@ -89,4 +89,7 @@ class_definition = { ...@@ -89,4 +89,7 @@ class_definition = {
} }
} }
return json.dumps(dict(graph=getDCWorkflowGraph(context), class_definition=class_definition), indent=2) return json.dumps(
dict(graph=getDCWorkflowGraph(context), class_definition=class_definition),
sort_keys=True,
indent=2)
...@@ -64,4 +64,7 @@ def getWorkflowGraph(workflow): ...@@ -64,4 +64,7 @@ def getWorkflowGraph(workflow):
graph['node'][state_id]['coordinate'] = position_graph['node'][state_id]['coordinate'] graph['node'][state_id]['coordinate'] = position_graph['node'][state_id]['coordinate']
return graph return graph
return json.dumps(dict(graph=getWorkflowGraph(context), class_definition={}), indent=2) return json.dumps(
dict(graph=getWorkflowGraph(context), class_definition={}),
sort_keys=True,
indent=2)
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>height</string> </key> <key> <string>height</string> </key>
<value> <int>284</int> </value> <value> <int>277</int> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
......
...@@ -677,7 +677,8 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, ...@@ -677,7 +677,8 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
json.dumps(ensureSerializable({ json.dumps(ensureSerializable({
'original_form_id': form.id, 'original_form_id': form.id,
'field_id': field.id 'field_id': field.id
}))))) }),
sort_keys=True))))
} }
}) })
...@@ -799,9 +800,9 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, ...@@ -799,9 +800,9 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
"form_relative_url": "%s/%s" % (form_relative_url, field.id), "form_relative_url": "%s/%s" % (form_relative_url, field.id),
"list_method": list_method_name, "list_method": list_method_name,
"default_param_json": bytes2str(urlsafe_b64encode(str2bytes( "default_param_json": bytes2str(urlsafe_b64encode(str2bytes(
json.dumps(ensureSerializable(list_method_query_dict))))), json.dumps(ensureSerializable(list_method_query_dict), sort_keys=True)))),
"extra_param_json": bytes2str(urlsafe_b64encode(str2bytes( "extra_param_json": bytes2str(urlsafe_b64encode(str2bytes(
json.dumps(ensureSerializable(extra_param_dict))))) json.dumps(ensureSerializable(extra_param_dict), sort_keys=True))))
} }
# once we imprint `default_params` into query string of 'list method' we # once we imprint `default_params` into query string of 'list method' we
# don't want them to propagate to the query as well # don't want them to propagate to the query as well
...@@ -820,7 +821,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, ...@@ -820,7 +821,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
"script_id": script.id, "script_id": script.id,
"relative_url": traversed_document.getRelativeUrl().replace("/", "%2F"), "relative_url": traversed_document.getRelativeUrl().replace("/", "%2F"),
"list_method": list_method_name, "list_method": list_method_name,
"default_param_json": bytes2str(urlsafe_b64encode(str2bytes(json.dumps(ensureSerializable(list_method_query_dict))))) "default_param_json": bytes2str(urlsafe_b64encode(str2bytes(json.dumps(ensureSerializable(list_method_query_dict), sort_keys=True))))
} }
list_method_query_dict = {} list_method_query_dict = {}
""" """
...@@ -1069,7 +1070,9 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti ...@@ -1069,7 +1070,9 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
'proxy_listbox_id': x, 'proxy_listbox_id': x,
'original_form_id': extra_param_json['original_form_id'], 'original_form_id': extra_param_json['original_form_id'],
'field_id': extra_param_json['field_id'] 'field_id': extra_param_json['field_id']
}))))) }),
sort_keys=True,
))))
}) for x, y in proxy_form_id_list], }) for x, y in proxy_form_id_list],
"first_item": 1, "first_item": 1,
"required": 0, "required": 0,
...@@ -1092,7 +1095,8 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti ...@@ -1092,7 +1095,8 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
'proxy_listbox_id': REQUEST.get('proxy_listbox_id', None), 'proxy_listbox_id': REQUEST.get('proxy_listbox_id', None),
'original_form_id': extra_param_json['original_form_id'], 'original_form_id': extra_param_json['original_form_id'],
'field_id': extra_param_json['field_id'] 'field_id': extra_param_json['field_id']
}))))) }),
sort_keys=True))))
} }
# Go through all groups ("left", "bottom", "hidden" etc.) and add fields from # Go through all groups ("left", "bottom", "hidden" etc.) and add fields from
...@@ -1591,7 +1595,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -1591,7 +1595,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
"script_id": script.id, # this script (ERP5Document_getHateoas) "script_id": script.id, # this script (ERP5Document_getHateoas)
"relative_url": getRealRelativeUrl(traversed_document).replace("/", "%2F"), "relative_url": getRealRelativeUrl(traversed_document).replace("/", "%2F"),
"view": erp5_action_list[-1]['name'], "view": erp5_action_list[-1]['name'],
"extra_param_json": bytes2str(urlsafe_b64encode(str2bytes(json.dumps(ensureSerializable(extra_param_json))))) "extra_param_json": bytes2str(urlsafe_b64encode(str2bytes(json.dumps(ensureSerializable(extra_param_json), sort_keys=True))))
} }
if erp5_action_list: if erp5_action_list:
...@@ -1758,7 +1762,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -1758,7 +1762,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
'relative_url': relative_url, 'relative_url': relative_url,
'group_by': group_by, 'group_by': group_by,
'sort_on': sort_on 'sort_on': sort_on
}))))) }),
sort_keys=True,
))))
# set 'here' for field rendering which contain TALES expressions # set 'here' for field rendering which contain TALES expressions
REQUEST.set('here', traversed_document) REQUEST.set('here', traversed_document)
...@@ -2205,7 +2211,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -2205,7 +2211,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
"relative_url": url_parameter_dict['view_kw']['jio_key'].replace("/", "%2F"), "relative_url": url_parameter_dict['view_kw']['jio_key'].replace("/", "%2F"),
"view": url_parameter_dict['view_kw']['view'], "view": url_parameter_dict['view_kw']['view'],
"extra_param_json": bytes2str(urlsafe_b64encode(str2bytes( "extra_param_json": bytes2str(urlsafe_b64encode(str2bytes(
json.dumps(ensureSerializable(extra_url_param_dict))))) json.dumps(ensureSerializable(extra_url_param_dict), sort_keys=True))))
} }
# endfor select # endfor select
...@@ -2353,7 +2359,8 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -2353,7 +2359,8 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
checkPermission = portal.Base_checkPermission checkPermission = portal.Base_checkPermission
work_list = [] work_list = []
for action in action_list: for action in action_list:
query = sql_catalog.buildQuery(action['query'])\ # sort the query for easier testing
query = sql_catalog.buildQuery(OrderedDict(sorted(action['query'].items())))\
.asSearchTextExpression(sql_catalog) .asSearchTextExpression(sql_catalog)
if (action['local_roles']): if (action['local_roles']):
...@@ -2423,7 +2430,7 @@ if mode == 'url_generator': ...@@ -2423,7 +2430,7 @@ if mode == 'url_generator':
else: else:
generator_key = 'traverse_generator_action' generator_key = 'traverse_generator_action'
keep_items_json = bytes2str(urlsafe_b64encode(str2bytes( keep_items_json = bytes2str(urlsafe_b64encode(str2bytes(
json.dumps(ensureSerializable(keep_items))))) json.dumps(ensureSerializable(keep_items), sort_keys=True))))
return url_template_dict[generator_key] % { return url_template_dict[generator_key] % {
"root_url": site_root.absolute_url(), "root_url": site_root.absolute_url(),
"script_id": 'ERP5Document_getHateoas', "script_id": 'ERP5Document_getHateoas',
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,4 +37,7 @@ for i, tracking in enumerate(reversed(portal.portal_simulation.getTrackingList(a ...@@ -37,4 +37,7 @@ for i, tracking in enumerate(reversed(portal.portal_simulation.getTrackingList(a
link=movement.absolute_url(), link=movement.absolute_url(),
source=movement.getSourceUid() or "null", source=movement.getSourceUid() or "null",
destination=movement.getDestinationUid() or "null") destination=movement.getDestinationUid() or "null")
return json.dumps(dict(graph=graph, class_definition=class_definition), indent=2) return json.dumps(
dict(graph=graph, class_definition=class_definition),
sort_keys=True,
indent=2)
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>priority</string> </key> <key> <string>priority</string> </key>
<value> <float>6.0</float> </value> <value> <float>20.0</float> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
import six.moves.urllib.parse
import uuid import uuid
import mock import mock
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...@@ -92,11 +93,15 @@ class TestFacebookLogin(ERP5TypeTestCase): ...@@ -92,11 +93,15 @@ class TestFacebookLogin(ERP5TypeTestCase):
self.logout() self.logout()
self.portal.ERP5Site_redirectToFacebookLoginPage() self.portal.ERP5Site_redirectToFacebookLoginPage()
location = self.portal.REQUEST.RESPONSE.getHeader("Location") location = self.portal.REQUEST.RESPONSE.getHeader("Location")
self.assertIn("https://www.facebook.com/v2.10/dialog/oauth?", location)
self.assertIn("scope=email&redirect_uri=", location)
self.assertIn("client_id=%s" % CLIENT_ID, location)
self.assertNotIn("secret_key=", location)
self.assertIn("ERP5Site_callbackFacebookLogin", location) self.assertIn("ERP5Site_callbackFacebookLogin", location)
parsed_location = six.moves.urllib.parse.urlparse(location)
self.assertEqual(parsed_location.hostname, 'www.facebook.com')
self.assertEqual(parsed_location.path, '/v2.10/dialog/oauth')
params = dict(six.moves.urllib.parse.parse_qsl(parsed_location.query))
self.assertEqual(params['scope'], 'email')
self.assertEqual(params['client_id'], CLIENT_ID)
self.assertIn("redirect_uri", params)
self.assertNotIn("secret_key", params)
def test_existing_user(self): def test_existing_user(self):
self.login() self.login()
......
...@@ -116,7 +116,7 @@ social_contribution_stop_date = None ...@@ -116,7 +116,7 @@ social_contribution_stop_date = None
for employee_result in paysheet_data_list: for employee_result in paysheet_data_list:
employee_ctp = employee_result['ctp'] employee_ctp = employee_result['ctp']
for ctp_code in employee_ctp: for ctp_code in employee_ctp:
if social_contribution_organisation is None: if social_contribution_organisation is None and 'corporate_registration_code' in employee_ctp[ctp_code]:
social_contribution_organisation = employee_ctp[ctp_code]['corporate_registration_code'] social_contribution_organisation = employee_ctp[ctp_code]['corporate_registration_code']
social_contribution_start_date = employee_ctp[ctp_code]['start_date'] social_contribution_start_date = employee_ctp[ctp_code]['start_date']
social_contribution_stop_date = employee_ctp[ctp_code]['stop_date'] social_contribution_stop_date = employee_ctp[ctp_code]['stop_date']
...@@ -284,13 +284,13 @@ for employee_data_dict, paysheet_data_dict in employee_result_list: ...@@ -284,13 +284,13 @@ for employee_data_dict, paysheet_data_dict in employee_result_list:
for remuneration_block in paysheet_data_dict['remuneration']: for remuneration_block in paysheet_data_dict['remuneration']:
dsn_file.append(remuneration_block) dsn_file.append(remuneration_block)
for bonus_category in sorted(six.itervalues(paysheet_data_dict['other_bonus'])): for bonus_category in sorted(six.itervalues(paysheet_data_dict['other_bonus']), key=lambda v: (v['code'],)):
dsn_file.append(getDSNBlockDict(block_id='S21.G00.52', target=bonus_category)) dsn_file.append(getDSNBlockDict(block_id='S21.G00.52', target=bonus_category))
for bonus_category in sorted(six.itervalues(paysheet_data_dict['other_income'])): for bonus_category in sorted(six.itervalues(paysheet_data_dict['other_income']), key=lambda v: (v['code'],)):
dsn_file.append(getDSNBlockDict(block_id='S21.G00.54', target=bonus_category)) dsn_file.append(getDSNBlockDict(block_id='S21.G00.54', target=bonus_category))
for taxable_base_category in sorted(six.itervalues(paysheet_data_dict['taxable_base'])): for taxable_base_category in sorted(six.itervalues(paysheet_data_dict['taxable_base']), key=lambda v: (v['code'], v['contract_id'],)):
dsn_file.append(getDSNBlockDict(block_id='S21.G00.78', target=taxable_base_category)) dsn_file.append(getDSNBlockDict(block_id='S21.G00.78', target=taxable_base_category))
if taxable_base_category['code'] == '02': # Assiette Brute plafonnee if taxable_base_category['code'] == '02': # Assiette Brute plafonnee
if ('063', '') in paysheet_data_dict['individual_contribution']: if ('063', '') in paysheet_data_dict['individual_contribution']:
......
...@@ -205,19 +205,6 @@ S21.G00.54.001,'18' ...@@ -205,19 +205,6 @@ S21.G00.54.001,'18'
S21.G00.54.002,'23.00' S21.G00.54.002,'23.00'
S21.G00.54.003,'01012015' S21.G00.54.003,'01012015'
S21.G00.54.004,'31012015' S21.G00.54.004,'31012015'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'13'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'94.91'
S21.G00.78.001,'02' S21.G00.78.001,'02'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
...@@ -236,10 +223,27 @@ S21.G00.81.001,'226' ...@@ -236,10 +223,27 @@ S21.G00.81.001,'226'
S21.G00.81.002,'75367340900011' S21.G00.81.002,'75367340900011'
S21.G00.81.003,'2250.00' S21.G00.81.003,'2250.00'
S21.G00.81.005,'59378' S21.G00.81.005,'59378'
S21.G00.78.001,'04'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'2305.53'
S21.G00.78.001,'07' S21.G00.78.001,'07'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
S21.G00.78.004,'2250.00' S21.G00.78.004,'2250.00'
S21.G00.78.001,'13'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'94.91'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'31' S21.G00.78.001,'31'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
...@@ -249,10 +253,6 @@ S21.G00.79.001,'11' ...@@ -249,10 +253,6 @@ S21.G00.79.001,'11'
S21.G00.79.004,'2250.00' S21.G00.79.004,'2250.00'
S21.G00.81.001,'059' S21.G00.81.001,'059'
S21.G00.81.004,'15.75' S21.G00.81.004,'15.75'
S21.G00.78.001,'04'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'2305.53'
S21.G00.81.001,'018' S21.G00.81.001,'018'
S21.G00.81.002,'75367340900011' S21.G00.81.002,'75367340900011'
S21.G00.81.003,'2250.00' S21.G00.81.003,'2250.00'
...@@ -335,19 +335,6 @@ S21.G00.54.001,'17' ...@@ -335,19 +335,6 @@ S21.G00.54.001,'17'
S21.G00.54.002,'62.40' S21.G00.54.002,'62.40'
S21.G00.54.003,'01012015' S21.G00.54.003,'01012015'
S21.G00.54.004,'31012015' S21.G00.54.004,'31012015'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'13'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'94.07'
S21.G00.78.001,'02' S21.G00.78.001,'02'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
...@@ -364,10 +351,27 @@ S21.G00.81.001,'226' ...@@ -364,10 +351,27 @@ S21.G00.81.001,'226'
S21.G00.81.002,'75367340900011' S21.G00.81.002,'75367340900011'
S21.G00.81.003,'3085.28' S21.G00.81.003,'3085.28'
S21.G00.81.005,'59378' S21.G00.81.005,'59378'
S21.G00.78.001,'04'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'4125.36'
S21.G00.78.001,'07' S21.G00.78.001,'07'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
S21.G00.78.004,'3085.28' S21.G00.78.004,'3085.28'
S21.G00.78.001,'13'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'94.07'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'31' S21.G00.78.001,'31'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
...@@ -377,10 +381,6 @@ S21.G00.79.001,'11' ...@@ -377,10 +381,6 @@ S21.G00.79.001,'11'
S21.G00.79.004,'3085.28' S21.G00.79.004,'3085.28'
S21.G00.81.001,'059' S21.G00.81.001,'059'
S21.G00.81.004,'21.60' S21.G00.81.004,'21.60'
S21.G00.78.001,'04'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'4125.36'
S21.G00.86.001,'01' S21.G00.86.001,'01'
S21.G00.86.002,'02' S21.G00.86.002,'02'
S21.G00.86.003,'11' S21.G00.86.003,'11'
...@@ -459,36 +459,12 @@ S21.G00.54.001,'17' ...@@ -459,36 +459,12 @@ S21.G00.54.001,'17'
S21.G00.54.002,'67.20' S21.G00.54.002,'67.20'
S21.G00.54.003,'01012015' S21.G00.54.003,'01012015'
S21.G00.54.004,'31012015' S21.G00.54.004,'31012015'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'13'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'86.36'
S21.G00.78.001,'02' S21.G00.78.001,'02'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
S21.G00.78.004,'3170.00' S21.G00.78.004,'3170.00'
S21.G00.81.001,'063' S21.G00.81.001,'063'
S21.G00.81.004,'323.55' S21.G00.81.004,'323.55'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'2'
S21.G00.79.001,'11'
S21.G00.79.004,'3170.00'
S21.G00.79.001,'13'
S21.G00.79.004,'657.86'
S21.G00.81.001,'059'
S21.G00.81.004,'29.29'
S21.G00.78.001,'03' S21.G00.78.001,'03'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
...@@ -499,14 +475,38 @@ S21.G00.81.001,'226' ...@@ -499,14 +475,38 @@ S21.G00.81.001,'226'
S21.G00.81.002,'75367340900011' S21.G00.81.002,'75367340900011'
S21.G00.81.003,'3827.86' S21.G00.81.003,'3827.86'
S21.G00.81.005,'59378' S21.G00.81.005,'59378'
S21.G00.78.001,'04'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'3847.23'
S21.G00.78.001,'07' S21.G00.78.001,'07'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
S21.G00.78.004,'3827.86' S21.G00.78.004,'3827.86'
S21.G00.78.001,'04' S21.G00.78.001,'13'
S21.G00.78.002,'01012015' S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015' S21.G00.78.003,'31012015'
S21.G00.78.004,'3847.23' S21.G00.78.004,'86.36'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'1'
S21.G00.79.001,'20'
S21.G00.79.004,'97.16'
S21.G00.81.001,'059'
S21.G00.81.004,'97.16'
S21.G00.78.001,'31'
S21.G00.78.002,'01012015'
S21.G00.78.003,'31012015'
S21.G00.78.004,'0.00'
S21.G00.78.005,'2'
S21.G00.79.001,'11'
S21.G00.79.004,'3170.00'
S21.G00.79.001,'13'
S21.G00.79.004,'657.86'
S21.G00.81.001,'059'
S21.G00.81.004,'29.29'
S21.G00.86.001,'01' S21.G00.86.001,'01'
S21.G00.86.002,'02' S21.G00.86.002,'02'
S21.G00.86.003,'11' S21.G00.86.003,'11'
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<key> <string>tested_property</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
erp5_full_text_mroonga_catalog erp5_full_text_mroonga_catalog
erp5_base erp5_base
erp5_worklist_sql
erp5_security_uid_innodb_catalog_test
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL Method" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z0_drop_alternate_roles_and_users</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>SQL Method</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>z0_drop_alternate_roles_and_users</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
DELETE FROM alternate_roles_and_users
WHERE <dtml-sqltest uid op=eq type=int multiple>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL Method" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z0_uncatalog_alternate_roles_and_users</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>SQL Method</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>z0_uncatalog_alternate_roles_and_users</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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