Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.core
Commits
273c8b39
Commit
273c8b39
authored
Sep 21, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Internal Packing List constraints.
parent
325559e7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
536 additions
and
1 deletion
+536
-1
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint.xml
...al_property_sheets/VifibInternalPackingListConstraint.xml
+4
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/destination_constraint.xml
...bInternalPackingListConstraint/destination_constraint.xml
+58
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/destination_state_constraint.xml
...nalPackingListConstraint/destination_state_constraint.xml
+88
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/lines_constraint.xml
...s/VifibInternalPackingListConstraint/lines_constraint.xml
+50
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/reference_not_empty_constraint.xml
...lPackingListConstraint/reference_not_empty_constraint.xml
+105
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/source_state_constraint.xml
...InternalPackingListConstraint/source_state_constraint.xml
+88
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/start_date_existence_constraint.xml
...PackingListConstraint/start_date_existence_constraint.xml
+67
-0
master/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
...er/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
+75
-0
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
No files found.
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint.xml
View file @
273c8b39
...
...
@@ -28,6 +28,10 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
VifibInternalPackingListConstraint
</string>
</value>
</item>
<item>
<key>
<string>
last_id
</string>
</key>
<value>
<string>
3
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
...
...
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/destination_constraint.xml
View file @
273c8b39
...
...
@@ -6,6 +6,18 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
constraint_base_category
</string>
</key>
<value>
...
...
@@ -30,6 +42,22 @@
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
message_arity_not_in_range
</string>
</key>
<value>
<string>
Destination must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_too_small
</string>
</key>
<value>
<string>
Destination must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_with_portal_type_not_in_range
</string>
</key>
<value>
<string>
Destination must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_with_portal_type_too_small
</string>
</key>
<value>
<string>
Destination must be defined
</string>
</value>
</item>
<item>
<key>
<string>
min_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
...
...
@@ -45,4 +73,34 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/destination_state_constraint.xml
0 → 100644
View file @
273c8b39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category Membership State Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
base_category
</string>
</key>
<value>
<string>
destination
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
destination_state_constraint
</string>
</value>
</item>
<item>
<key>
<string>
membership_portal_type_list
</string>
</key>
<value>
<string>
python: portal.getPortalNodeTypeList()
</string>
</value>
</item>
<item>
<key>
<string>
message_different_state
</string>
</key>
<value>
<string>
Destination must be validated
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category Membership State Constraint
</string>
</value>
</item>
<item>
<key>
<string>
workflow_state_list
</string>
</key>
<value>
<string>
python: \'validated\'
</string>
</value>
</item>
<item>
<key>
<string>
workflow_variable
</string>
</key>
<value>
<string>
validation_state
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/lines_constraint.xml
View file @
273c8b39
...
...
@@ -6,6 +6,18 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
constraint_portal_type
</string>
</key>
<value>
<string>
python: (\'Internal Packing List Line\',)
</string>
</value>
...
...
@@ -18,6 +30,14 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
lines_constraint
</string>
</value>
</item>
<item>
<key>
<string>
message_no_subobject
</string>
</key>
<value>
<string>
Internal Packing List Line is not defined
</string>
</value>
</item>
<item>
<key>
<string>
message_no_subobject_portal_type
</string>
</key>
<value>
<string>
Internal Packing List Line is not defined
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Content Existence Constraint
</string>
</value>
...
...
@@ -29,4 +49,34 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/reference_not_empty_constraint.xml
0 → 100644
View file @
273c8b39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"String Attribute Match Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
message_property_not_set
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
constraint_property
</string>
</key>
<value>
<tuple>
<string>
reference
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
reference_not_empty_constraint
</string>
</value>
</item>
<item>
<key>
<string>
message_attribute_match
</string>
</key>
<value>
<string>
Reference must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_no_such_property
</string>
</key>
<value>
<string>
Reference must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_property_not_set
</string>
</key>
<value>
<string>
Reference must be defined
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
String Attribute Match Constraint
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/source_state_constraint.xml
0 → 100644
View file @
273c8b39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category Membership State Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
base_category
</string>
</key>
<value>
<string>
source
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
source_state_constraint
</string>
</value>
</item>
<item>
<key>
<string>
membership_portal_type_list
</string>
</key>
<value>
<string>
python: portal.getPortalNodeTypeList()
</string>
</value>
</item>
<item>
<key>
<string>
message_different_state
</string>
</key>
<value>
<string>
Source must be validated
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category Membership State Constraint
</string>
</value>
</item>
<item>
<key>
<string>
workflow_state_list
</string>
</key>
<value>
<string>
python: \'validated\'
</string>
</value>
</item>
<item>
<key>
<string>
workflow_variable
</string>
</key>
<value>
<string>
validation_state
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListConstraint/start_date_existence_constraint.xml
View file @
273c8b39
...
...
@@ -6,6 +6,35 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
message_property_not_set
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
constraint_property
</string>
</key>
<value>
...
...
@@ -22,6 +51,14 @@
<key>
<string>
id
</string>
</key>
<value>
<string>
start_date_existence_constraint
</string>
</value>
</item>
<item>
<key>
<string>
message_no_such_property
</string>
</key>
<value>
<string>
Property start_date must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_property_not_set
</string>
</key>
<value>
<string>
Property start_date must be defined
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Existence Constraint
</string>
</value>
...
...
@@ -29,4 +66,34 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
View file @
273c8b39
...
...
@@ -161,3 +161,78 @@ class TestVifibEmailConstraint(testVifibMixin):
self
.
stepTic
()
self
.
assertFalse
(
consistency_message
in
getMessageList
(
email
))
self
.
assertFalse
(
consistency_message
in
getMessageList
(
email_2
))
class
TestVifibInternalPackingListConstraint
(
testVifibMixin
):
def
getTitle
(
self
):
return
"Vifib Internal Packing List Constraint checks"
def
test_reference_not_empty
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
# reference is set during object creation, set reset it
ipl
.
setReference
(
None
)
consistency_message
=
'Reference must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
ipl
.
setReference
(
rndstr
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
def
test_start_date_not_empty
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
consistency_message
=
'Property start_date must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
ipl
.
setStartDate
(
'2011/01/01'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
def
test_destination_not_empty
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
destination
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
consistency_message
=
'Destination must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
ipl
.
setDestination
(
destination
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
def
test_destination_validated
(
self
):
destination
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
,
destination
=
destination
.
getRelativeUrl
())
consistency_message
=
'Destination must be validated'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
destination
.
validate
()
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
def
test_source_validated
(
self
):
source
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
,
source
=
source
.
getRelativeUrl
())
consistency_message
=
'Source must be validated'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
source
.
validate
()
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
def
test_lines_existance
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
ipl
.
confirm
()
consistency_message
=
'Internal Packing List Line is not defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
ipl
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
master/bt5/vifib_erp5/bt/revision
View file @
273c8b39
195
\ No newline at end of file
196
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment