Commit 28bba303 authored by Łukasz Nowak's avatar Łukasz Nowak

- add check, that well transformation is chosen for resource, removed start...

 - add check, that well transformation is chosen for resource, removed start date existence - it is tested on order, and acquisition do not works for chcker (???)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22152 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6e691043
...@@ -59,17 +59,17 @@ class ProductionOrderLine: ...@@ -59,17 +59,17 @@ class ProductionOrderLine:
'expression' : 'python: object.getTotalQuantity() > 0', 'expression' : 'python: object.getTotalQuantity() > 0',
'message_expression_false': 'Total Quantity must not be 0', 'message_expression_false': 'Total Quantity must not be 0',
}, },
{ 'id' : 'start_date',
'description' : 'Start Date must be defined',
'type' : 'PropertyExistence',
'start_date' : 1,
'message_no_such_property' : "Shipping Date must be defined",
'message_property_not_set' : "Shipping Date must be defined",
},
{ 'id' : 'date_coherency', { 'id' : 'date_coherency',
'description' : 'Stop Date must be after Start Date', 'description' : 'Stop Date must be after Start Date',
'type' : 'TALESConstraint', 'type' : 'TALESConstraint',
'expression' : 'python: object.getStopDate() >= object.getStartDate()', 'expression' : 'python: object.getStopDate() >= object.getStartDate()',
'message_expression_false': 'Delivery Date must be after Shipping Date', 'message_expression_false': 'Delivery Date must be after Shipping Date',
}, },
{ 'id' : 'transformation_for_resource',
'description' : 'Transformation must match chosen resource',
'type' : 'TALESConstraint',
'expression' : 'python: object.getResourceValue() is not None and object.getSpecialise() in \
object.getResourceValue().getResourceRelatedList(portal_type=object.getPortalTransformationTypeList())',
'message_expression_false': 'Transformation must match chosen resource',
},
) )
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