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
Nicolas Wavrant
slapos.core
Commits
5ecbd829
Commit
5ecbd829
authored
Sep 21, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Purchase Packing List Line constraints.
parent
26fd3cd6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
274 additions
and
4 deletions
+274
-4
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListConstraint.xml
...al_property_sheets/VifibPurchasePackingListConstraint.xml
+4
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListConstraint/lines_constraint.xml
...s/VifibPurchasePackingListConstraint/lines_constraint.xml
+53
-1
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListConstraint/reference_not_empty_constraint.xml
...ePackingListConstraint/reference_not_empty_constraint.xml
+105
-0
master/bt5/vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/VifibPurchasePackingListConstraint/start_date_existence_constraint.xml
...PackingListConstraint/start_date_existence_constraint.xml
+70
-1
master/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
...er/bt5/vifib_erp5/TestTemplateItem/testVifibConstraint.py
+41
-1
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/VifibPurchasePackingListConstraint.xml
View file @
5ecbd829
...
@@ -28,6 +28,10 @@
...
@@ -28,6 +28,10 @@
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
VifibPurchasePackingListConstraint
</string>
</value>
<value>
<string>
VifibPurchasePackingListConstraint
</string>
</value>
</item>
</item>
<item>
<key>
<string>
last_id
</string>
</key>
<value>
<string>
1
</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/VifibPurchasePackingListConstraint/lines_constraint.xml
View file @
5ecbd829
...
@@ -6,18 +6,40 @@
...
@@ -6,18 +6,40 @@
</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_portal_type
</string>
</key>
<key>
<string>
constraint_portal_type
</string>
</key>
<value>
<string>
python: (\'Purchase Packing List Line\',)
</string>
</value>
<value>
<string>
python: (\'Purchase Packing List Line\',)
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<string>
Purchase Packing List Line is not defined
</string>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
lines_constraint
</string>
</value>
<value>
<string>
lines_constraint
</string>
</value>
</item>
</item>
<item>
<key>
<string>
message_no_subobject
</string>
</key>
<value>
<string>
Purchase Packing List Line is not defined
</string>
</value>
</item>
<item>
<key>
<string>
message_no_subobject_portal_type
</string>
</key>
<value>
<string>
Purchase Packing List Line is not defined
</string>
</value>
</item>
<item>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Content Existence Constraint
</string>
</value>
<value>
<string>
Content Existence Constraint
</string>
</value>
...
@@ -25,4 +47,34 @@
...
@@ -25,4 +47,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/VifibPurchasePackingListConstraint/reference_not_empty_constraint.xml
0 → 100644
View file @
5ecbd829
<?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/VifibPurchasePackingListConstraint/start_date_existence_constraint.xml
View file @
5ecbd829
...
@@ -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 start_date must be defined
</string>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
start_date_existence_constraint
</string>
</value>
<value>
<string>
start_date_existence_constraint
</string>
</value>
</item>
</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>
<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>
...
@@ -29,4 +68,34 @@
...
@@ -29,4 +68,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/TestTemplateItem/testVifibConstraint.py
View file @
5ecbd829
...
@@ -285,7 +285,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin):
...
@@ -285,7 +285,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin):
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
self
.
assertFalse
(
consistency_message
in
getMessageList
(
line
))
class
t
estVifibPersonConstraint
(
testVifibMixin
):
class
T
estVifibPersonConstraint
(
testVifibMixin
):
def
getTitle
(
self
):
def
getTitle
(
self
):
return
"Vifib Person Constraint checks"
return
"Vifib Person Constraint checks"
...
@@ -336,3 +336,43 @@ class testVifibPersonConstraint(testVifibMixin):
...
@@ -336,3 +336,43 @@ class testVifibPersonConstraint(testVifibMixin):
person
.
newContent
(
portal_type
=
'Email'
)
person
.
newContent
(
portal_type
=
'Email'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
person
))
self
.
assertFalse
(
consistency_message
in
getMessageList
(
person
))
class
TestVifibPurchasePackingListConstraint
(
testVifibMixin
):
def
getTitle
(
self
):
return
"Vifib Purchase Packing List Constraint checks"
def
test_reference_not_empty
(
self
):
ppl
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
)
consistency_message
=
'Reference must be defined'
# reset reference, as set during object creation
ppl
.
setReference
(
None
)
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ppl
))
ppl
.
setReference
(
rndstr
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ppl
))
def
test_start_date_existence
(
self
):
ppl
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
)
consistency_message
=
'Property start_date must be defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ppl
))
ppl
.
setStartDate
(
'2011/01/01'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ppl
))
def
test_lines
(
self
):
ppl
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
)
consistency_message
=
'Purchase Packing List Line is not defined'
self
.
assertTrue
(
consistency_message
in
getMessageList
(
ppl
))
ppl
.
newContent
(
portal_type
=
'Purchase Packing List Line'
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
ppl
))
master/bt5/vifib_erp5/bt/revision
View file @
5ecbd829
198
199
\ 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