Commit fc0f03be authored by Sebastien Robin's avatar Sebastien Robin

commit patch of Thierry, production rules where only partially expanded

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9247 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 02a0e9e5
...@@ -178,7 +178,10 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount): ...@@ -178,7 +178,10 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
# must be true # must be true
# Create temporary object to store amount # Create temporary object to store amount
from Products.ERP5Type.Document import newTempAmount from Products.ERP5Type.Document import newTempAmount
tmp_amount = newTempAmount(self.getPortalObject(), self.getId()) # XXX changed by TB getParentID()+getId() instead of getId()
# This might not be enough if we have different transformation
# with the same id (for example in several modules)
tmp_amount = newTempAmount(self.getPortalObject(), self.getParentId()+'_'+self.getId())
# Create error string # Create error string
error_string = '' error_string = ''
# Add resource relation # Add resource relation
......
...@@ -341,7 +341,9 @@ class TestProductionOrderMixin(TestOrderMixin): ...@@ -341,7 +341,9 @@ class TestProductionOrderMixin(TestOrderMixin):
simulation_movement_list = applied_rule.objectValues() simulation_movement_list = applied_rule.objectValues()
self.assertEquals(2, len(simulation_movement_list)) self.assertEquals(2, len(simulation_movement_list))
# Test consumed movement # Test consumed movement
consumed_movement = applied_rule.cr_1 transformation = sequence.get('transformation')
consumed_movement_id = 'cr_%s_1' % transformation.getId()
consumed_movement = applied_rule[consumed_movement_id]
operation_resource = consumed_movement.portal_categories.resolveCategory( operation_resource = consumed_movement.portal_categories.resolveCategory(
'operation/operation1') 'operation/operation1')
# FIXME # FIXME
......
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