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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
487ccdb5
Commit
487ccdb5
authored
Nov 30, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialise migration of Sale Packing List Line constraint.
parent
470d286e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
210 additions
and
3 deletions
+210
-3
master/bt5/slapos_accounting/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+3
-0
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccountingSalePackingListLineConstraint.xml
..._sheets/SlapOSAccountingSalePackingListLineConstraint.xml
+66
-0
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccountingSalePackingListLineConstraint/property_existence_constraint.xml
...ckingListLineConstraint/property_existence_constraint.xml
+0
-1
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccountingSalePackingListLineConstraint/resource_arity_constraint.xml
...lePackingListLineConstraint/resource_arity_constraint.xml
+92
-0
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingConstraint.py
...unting/TestTemplateItem/testSlapOSAccountingConstraint.py
+45
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/slapos_accounting/bt/template_portal_type_property_sheet_list
...os_accounting/bt/template_portal_type_property_sheet_list
+1
-0
master/bt5/slapos_accounting/bt/template_property_sheet_id_list
.../bt5/slapos_accounting/bt/template_property_sheet_id_list
+1
-0
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
487ccdb5
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
<portal_type
id=
"Sale Packing List"
>
<portal_type
id=
"Sale Packing List"
>
<item>
SlapOSAccountingSalePackingListConstraint
</item>
<item>
SlapOSAccountingSalePackingListConstraint
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Sale Packing List Line"
>
<item>
SlapOSAccountingSalePackingListLineConstraint
</item>
</portal_type>
<portal_type
id=
"Slave Instance"
>
<portal_type
id=
"Slave Instance"
>
<item>
InstanceAccountingSynchronisation
</item>
<item>
InstanceAccountingSynchronisation
</item>
</portal_type>
</portal_type>
...
...
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccountingSalePackingListLineConstraint.xml
0 → 100644
View file @
487ccdb5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SlapOSAccountingSalePackingListLineConstraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/
vifib_erp5/PropertySheetTemplateItem/portal_property_sheets/Vifib
SalePackingListLineConstraint/property_existence_constraint.xml
→
master/bt5/
slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccounting
SalePackingListLineConstraint/property_existence_constraint.xml
View file @
487ccdb5
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<value>
<value>
<tuple>
<tuple>
<string>
price
</string>
<string>
price
</string>
<string>
quantity
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSAccountingSalePackingListLineConstraint/resource_arity_constraint.xml
0 → 100644
View file @
487ccdb5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category Membership Arity 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>
constraint_base_category
</string>
</key>
<value>
<tuple>
<string>
resource
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
constraint_portal_type
</string>
</key>
<value>
<string>
python: context.getPortalServiceTypeList()
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
resource_arity_constraint
</string>
</value>
</item>
<item>
<key>
<string>
max_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
min_arity
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category Membership Arity Constraint
</string>
</value>
</item>
<item>
<key>
<string>
use_acquisition
</string>
</key>
<value>
<int>
0
</int>
</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/slapos_accounting/TestTemplateItem/testSlapOSAccountingConstraint.py
View file @
487ccdb5
...
@@ -338,3 +338,48 @@ class TestSalePackingList(TestSlapOSConstraintMixin):
...
@@ -338,3 +338,48 @@ class TestSalePackingList(TestSlapOSConstraintMixin):
self
.
assertTrue
(
message
in
self
.
getMessageList
(
delivery
))
self
.
assertTrue
(
message
in
self
.
getMessageList
(
delivery
))
delivery
.
setStartDate
(
'2012/01/01'
)
delivery
.
setStartDate
(
'2012/01/01'
)
self
.
assertFalse
(
message
in
self
.
getMessageList
(
delivery
))
self
.
assertFalse
(
message
in
self
.
getMessageList
(
delivery
))
class
TestSalePackingListLine
(
TestSlapOSConstraintMixin
):
@
withAbort
def
test_property_existence
(
self
):
message
=
'Property existence error for property %s, this document has '
\
'no such property or the property has never been set'
message_price
=
message
%
'price'
message_quantity
=
message
%
'quantity'
delivery_line
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
'Sale Packing List'
).
newContent
(
portal_type
=
'Sale Packing List Line'
)
self
.
assertTrue
(
message_price
in
self
.
getMessageList
(
delivery_line
))
self
.
assertTrue
(
message_quantity
in
self
.
getMessageList
(
delivery_line
))
delivery_line
.
setQuantity
(
1.0
)
self
.
assertTrue
(
message_price
in
self
.
getMessageList
(
delivery_line
))
self
.
assertFalse
(
message_quantity
in
self
.
getMessageList
(
delivery_line
))
delivery_line
.
setPrice
(
1.0
)
self
.
assertFalse
(
message_price
in
self
.
getMessageList
(
delivery_line
))
self
.
assertFalse
(
message_quantity
in
self
.
getMessageList
(
delivery_line
))
def
test_resource_arity
(
self
):
category
=
'resource'
message
=
"Arity Error for Relation ['%s'], arity is equal to "
\
"0 but should be between 1 and 1"
%
category
message_2
=
"Arity Error for Relation ['%s'], arity is equal to "
\
"2 but should be between 1 and 1"
%
category
delivery_line
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
'Sale Packing List'
).
newContent
(
portal_type
=
'Sale Packing List Line'
)
product
=
self
.
portal
.
product_module
.
newContent
(
portal_type
=
'Product'
).
getRelativeUrl
()
service_1
=
self
.
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
).
getRelativeUrl
()
service_2
=
self
.
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
).
getRelativeUrl
()
key
=
'%s_list'
%
category
self
.
assertTrue
(
message
in
self
.
getMessageList
(
delivery_line
))
delivery_line
.
edit
(
**
{
key
:
[
product
]})
self
.
assertTrue
(
message
in
self
.
getMessageList
(
delivery_line
))
delivery_line
.
edit
(
**
{
key
:
[
service_1
,
service_2
]})
self
.
assertTrue
(
message_2
in
self
.
getMessageList
(
delivery_line
))
delivery_line
.
edit
(
**
{
key
:
[
service_1
]})
self
.
assertFalse
(
message
in
self
.
getMessageList
(
delivery_line
))
self
.
assertFalse
(
message_2
in
self
.
getMessageList
(
delivery_line
))
master/bt5/slapos_accounting/bt/revision
View file @
487ccdb5
191
192
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_portal_type_property_sheet_list
View file @
487ccdb5
Hosting Subscription | SlapOSAccountingHostingSubscriptionConstraint
Hosting Subscription | SlapOSAccountingHostingSubscriptionConstraint
Sale Invoice Transaction | SlapOSAccountingSaleInvoiceTransactionConstraint
Sale Invoice Transaction | SlapOSAccountingSaleInvoiceTransactionConstraint
Sale Packing List Line | SlapOSAccountingSalePackingListLineConstraint
Sale Packing List | SlapOSAccountingSalePackingListConstraint
Sale Packing List | SlapOSAccountingSalePackingListConstraint
Slave Instance | InstanceAccountingSynchronisation
Slave Instance | InstanceAccountingSynchronisation
Software Instance | InstanceAccountingSynchronisation
Software Instance | InstanceAccountingSynchronisation
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_property_sheet_id_list
View file @
487ccdb5
...
@@ -2,4 +2,5 @@ InstanceAccountingSynchronisation
...
@@ -2,4 +2,5 @@ InstanceAccountingSynchronisation
SlapOSAccountingHostingSubscriptionConstraint
SlapOSAccountingHostingSubscriptionConstraint
SlapOSAccountingSaleInvoiceTransactionConstraint
SlapOSAccountingSaleInvoiceTransactionConstraint
SlapOSAccountingSalePackingListConstraint
SlapOSAccountingSalePackingListConstraint
SlapOSAccountingSalePackingListLineConstraint
SlapOSAccountingSystemPreference
SlapOSAccountingSystemPreference
\ No newline at end of file
master/bt5/vifib_erp5/bt/revision
View file @
487ccdb5
578
579
\ 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