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
Boxiang Sun
slapos.core
Commits
08bef71c
Commit
08bef71c
authored
Sep 21, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Purchase Packing List Line constraints.
parent
5ecbd829
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
587 additions
and
3 deletions
+587
-3
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint.xml
...roperty_sheets/VifibPurchasePackingListLineConstraint.xml
+4
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/computer_state_constraint.xml
...sePackingListLineConstraint/computer_state_constraint.xml
+88
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/purchase_packing_list_line_aggregate_computer_constraint.xml
...chase_packing_list_line_aggregate_computer_constraint.xml
+50
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/purchase_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/VifibPurchasePackingListLineConstraint/quantity_existence_constraint.xml
...ckingListLineConstraint/quantity_existence_constraint.xml
+70
-1
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/resource_constraint.xml
...PurchasePackingListLineConstraint/resource_constraint.xml
+61
-1
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/resource_state_constraint.xml
...sePackingListLineConstraint/resource_state_constraint.xml
+88
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/software_release_state_constraint.xml
...gListLineConstraint/software_release_state_constraint.xml
+88
-0
master/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
...er/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
+87
-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/VifibPurchasePackingListLineConstraint.xml
View file @
08bef71c
...
@@ -28,6 +28,10 @@
...
@@ -28,6 +28,10 @@
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
VifibPurchasePackingListLineConstraint
</string>
</value>
<value>
<string>
VifibPurchasePackingListLineConstraint
</string>
</value>
</item>
</item>
<item>
<key>
<string>
last_id
</string>
</key>
<value>
<string>
3
</string>
</value>
</item>
<item>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
<value>
<string>
Property Sheet
</string>
</value>
...
...
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/computer_state_constraint.xml
0 → 100644
View file @
08bef71c
<?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>
aggregate
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
computer_state_constraint
</string>
</value>
</item>
<item>
<key>
<string>
membership_portal_type_list
</string>
</key>
<value>
<string>
python: (\'Computer\',)
</string>
</value>
</item>
<item>
<key>
<string>
message_different_state
</string>
</key>
<value>
<string>
Computer 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/VifibPurchasePackingListLineConstraint/purchase_packing_list_line_aggregate_computer_constraint.xml
View file @
08bef71c
...
@@ -6,6 +6,18 @@
...
@@ -6,6 +6,18 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<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>
<item>
<key>
<string>
constraint_base_category
</string>
</key>
<key>
<string>
constraint_base_category
</string>
</key>
<value>
<value>
...
@@ -32,6 +44,14 @@
...
@@ -32,6 +44,14 @@
<key>
<string>
max_arity
</string>
</key>
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
</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>
<item>
<key>
<string>
message_arity_with_portal_type_not_in_range
</string>
</key>
<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>
<value>
<string>
There should be exactly one ${portal_type} present in Items
</string>
</value>
...
@@ -59,4 +79,34 @@
...
@@ -59,4 +79,34 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</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>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/purchase_packing_list_line_aggregate_software_release_constraint.xml
View file @
08bef71c
...
@@ -6,6 +6,18 @@
...
@@ -6,6 +6,18 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<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>
<item>
<key>
<string>
constraint_base_category
</string>
</key>
<key>
<string>
constraint_base_category
</string>
</key>
<value>
<value>
...
@@ -32,6 +44,14 @@
...
@@ -32,6 +44,14 @@
<key>
<string>
max_arity
</string>
</key>
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
</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>
<item>
<key>
<string>
message_arity_with_portal_type_not_in_range
</string>
</key>
<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>
<value>
<string>
There should be exactly one ${portal_type} present in Items
</string>
</value>
...
@@ -59,4 +79,34 @@
...
@@ -59,4 +79,34 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</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>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/quantity_existence_constraint.xml
View file @
08bef71c
...
@@ -6,6 +6,35 @@
...
@@ -6,6 +6,35 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<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>
<item>
<key>
<string>
constraint_property
</string>
</key>
<key>
<string>
constraint_property
</string>
</key>
<value>
<value>
...
@@ -16,12 +45,22 @@
...
@@ -16,12 +45,22 @@
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<string>
Property quantity must be defined
</string>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
quantity_existence_constraint
</string>
</value>
<value>
<string>
quantity_existence_constraint
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Existence Constraint
</string>
</value>
<value>
<string>
Property Existence Constraint
</string>
</value>
...
@@ -33,4 +72,34 @@
...
@@ -33,4 +72,34 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</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>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/resource_constraint.xml
View file @
08bef71c
...
@@ -6,6 +6,18 @@
...
@@ -6,6 +6,18 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<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>
<item>
<key>
<string>
constraint_base_category
</string>
</key>
<key>
<string>
constraint_base_category
</string>
</key>
<value>
<value>
...
@@ -20,7 +32,9 @@
...
@@ -20,7 +32,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<string>
Resource must be defined
</string>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
@@ -30,6 +44,22 @@
...
@@ -30,6 +44,22 @@
<key>
<string>
max_arity
</string>
</key>
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
</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>
<item>
<key>
<string>
min_arity
</string>
</key>
<key>
<string>
min_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
1
</int>
</value>
...
@@ -45,4 +75,34 @@
...
@@ -45,4 +75,34 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</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>
</ZopeData>
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListLineConstraint/resource_state_constraint.xml
0 → 100644
View file @
08bef71c
<?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>
resource
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
resource_state_constraint
</string>
</value>
</item>
<item>
<key>
<string>
membership_portal_type_list
</string>
</key>
<value>
<string>
python: (\'Service\',)
</string>
</value>
</item>
<item>
<key>
<string>
message_different_state
</string>
</key>
<value>
<string>
Resource 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/VifibPurchasePackingListLineConstraint/software_release_state_constraint.xml
0 → 100644
View file @
08bef71c
<?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>
aggregate
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
software_release_state_constraint
</string>
</value>
</item>
<item>
<key>
<string>
membership_portal_type_list
</string>
</key>
<value>
<string>
python: (\'Software Release\',)
</string>
</value>
</item>
<item>
<key>
<string>
message_different_state
</string>
</key>
<value>
<string>
Software Release 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: (\'shared\', \'released\', \'published\')
</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/TestTemplateItem/testVifibConstraint.py
View file @
08bef71c
...
@@ -376,3 +376,90 @@ class TestVifibPurchasePackingListConstraint(testVifibMixin):
...
@@ -376,3 +376,90 @@ class TestVifibPurchasePackingListConstraint(testVifibMixin):
ppl
.
newContent
(
portal_type
=
'Purchase Packing List Line'
)
ppl
.
newContent
(
portal_type
=
'Purchase Packing List Line'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ppl
))
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ppl
))
class
TestVifibPurchasePackingListLineConstraint
(
testVifibMixin
):
def
getTitle
(
self
):
return
"Vifib Purchase Packing List Line Constraint checks"
def
test_aggregate_computer
(
self
):
consistency_message_existence
=
'There should be exactly one Computer '
\
'present in Items'
consistency_message_state
=
'Computer must be validated'
line
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
).
newContent
(
portal_type
=
'Purchase Packing List Line'
,
resource
=
self
.
portal
.
portal_preferences
\
.
getPreferredSoftwareSetupResource
())
self
.
assertTrue
(
consistency_message_existence
in
getMessageList
(
line
))
computer
=
self
.
portal
.
computer_module
.
newContent
(
portal_type
=
'Computer'
)
line
.
setAggregate
(
computer
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message_existence
in
getMessageList
(
line
))
self
.
assertTrue
(
consistency_message_state
in
getMessageList
(
line
))
computer
.
validate
()
self
.
assertFalse
(
consistency_message_state
in
getMessageList
(
line
))
def
test_aggregate_software_release
(
self
):
consistency_message_existence
=
'There should be exactly one Software '
\
'Release present in Items'
consistency_message_state
=
'Software Release must be validated'
line
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
).
newContent
(
portal_type
=
'Purchase Packing List Line'
,
resource
=
self
.
portal
.
portal_preferences
\
.
getPreferredSoftwareSetupResource
())
self
.
assertTrue
(
consistency_message_existence
in
getMessageList
(
line
))
software_release
=
self
.
portal
.
software_release_module
.
newContent
(
portal_type
=
'Software Release'
)
line
.
setAggregate
(
software_release
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message_existence
in
getMessageList
(
line
))
self
.
assertTrue
(
consistency_message_state
in
getMessageList
(
line
))
software_release
.
publish
()
self
.
assertFalse
(
consistency_message_state
in
getMessageList
(
line
))
def
test_resource
(
self
):
consistency_message_existence
=
'Resource must be defined'
consistency_message_state
=
'Resource must be validated'
line
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
).
newContent
(
portal_type
=
'Purchase Packing List Line'
)
self
.
assertTrue
(
consistency_message_existence
in
getMessageList
(
line
))
resource
=
self
.
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
)
line
.
setResource
(
resource
.
getRelativeUrl
())
self
.
assertFalse
(
consistency_message_existence
in
getMessageList
(
line
))
self
.
assertTrue
(
consistency_message_state
in
getMessageList
(
line
))
resource
.
validate
()
self
.
assertFalse
(
consistency_message_state
in
getMessageList
(
line
))
def
test_quantity
(
self
):
consistency_message
=
'Property quantity must be defined'
ppl
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
)
ppl
.
confirm
()
line
=
ppl
.
newContent
(
portal_type
=
'Purchase Packing List Line'
)
self
.
assertTrue
(
consistency_message
in
getMessageList
(
line
))
line
.
setQuantity
(
1.0
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
master/bt5/vifib_erp5/bt/revision
View file @
08bef71c
199
200
\ No newline at end of file
\ 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