Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
55c53707
Commit
55c53707
authored
Sep 21, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Internal Packing List Line constraints.
parent
273c8b39
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
224 additions
and
1 deletion
+224
-1
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListLineConstraint/internal_packing_list_line_aggregate_software_release_constraint.xml
...cking_list_line_aggregate_software_release_constraint.xml
+50
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListLineConstraint/quantity_existence_constraint.xml
...ckingListLineConstraint/quantity_existence_constraint.xml
+67
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibInternalPackingListLineConstraint/resource_constraint.xml
...InternalPackingListLineConstraint/resource_constraint.xml
+58
-0
master/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
...er/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
+48
-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/VifibInternalPackingListLineConstraint/internal_packing_list_line_aggregate_software_release_constraint.xml
View file @
55c53707
...
...
@@ -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>
...
...
@@ -32,6 +44,14 @@
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
message_arity_not_in_range
</string>
</key>
<value>
<string>
There should be exactly one ${portal_type} present in Items
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_too_small
</string>
</key>
<value>
<string>
There should be exactly one ${portal_type} present in Items
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_with_portal_type_not_in_range
</string>
</key>
<value>
<string>
There should be exactly one ${portal_type} present in Items
</string>
</value>
...
...
@@ -55,4 +75,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/VifibInternalPackingListLineConstraint/quantity_existence_constraint.xml
View file @
55c53707
...
...
@@ -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>
quantity_existence_constraint
</string>
</value>
</item>
<item>
<key>
<string>
message_no_such_property
</string>
</key>
<value>
<string>
Property quantity must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_property_not_set
</string>
</key>
<value>
<string>
Property quantity must be defined
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Existence Constraint
</string>
</value>
...
...
@@ -33,4 +70,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/VifibInternalPackingListLineConstraint/resource_constraint.xml
View file @
55c53707
...
...
@@ -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>
Resource must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_too_small
</string>
</key>
<value>
<string>
Resource must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_with_portal_type_not_in_range
</string>
</key>
<value>
<string>
Resource must be defined
</string>
</value>
</item>
<item>
<key>
<string>
message_arity_with_portal_type_too_small
</string>
</key>
<value>
<string>
Resource must be defined
</string>
</value>
</item>
<item>
<key>
<string>
min_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
...
...
@@ -49,4 +77,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 @
55c53707
...
...
@@ -236,3 +236,51 @@ class TestVifibInternalPackingListConstraint(testVifibMixin):
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ipl
))
ipl
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ipl
))
class
TestVifibInternalPackingListLineConstraint
(
testVifibMixin
):
def
getTitle
(
self
):
return
"Vifib Internal Packing List Line Constraint checks"
def
test_quantity_existence
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
ipl
.
confirm
()
line
=
ipl
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
consistency_message
=
'Property quantity must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
line
))
line
.
setQuantity
(
1.0
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
def
test_resource
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
ipl
.
confirm
()
line
=
ipl
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
consistency_message
=
'Resource must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
line
))
resource
=
self
.
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
)
line
.
setResource
(
resource
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
def
test_aggregate_computer
(
self
):
ipl
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
ipl
.
confirm
()
line
=
ipl
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
consistency_message
=
'There should be exactly one Computer present in Items'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
line
))
aggregate
=
self
.
portal
.
computer_module
.
newContent
(
portal_type
=
'Computer'
)
line
.
setAggregate
(
aggregate
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
master/bt5/vifib_erp5/bt/revision
View file @
55c53707
196
\ No newline at end of file
197
\ 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