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
Jérome Perrin
slapos.core
Commits
177b4dd3
Commit
177b4dd3
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Go back to merging builders.
Also update rule to allow automatic solving.
parent
cb16f458
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
99 deletions
+43
-99
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder.xml
...al_deliveries/slapos_sale_invoice_transaction_builder.xml
+4
-1
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/category_movement_group_on_line.xml
...e_transaction_builder/category_movement_group_on_line.xml
+1
-1
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/property_movement_group_on_line.xml
...e_transaction_builder/property_movement_group_on_line.xml
+1
-1
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/split_on_line.xml
...slapos_sale_invoice_transaction_builder/split_on_line.xml
+0
-44
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder.xml
...s/slapos_sale_invoice_transaction_trade_model_builder.xml
+4
-1
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder/split_on_line.xml
...invoice_transaction_trade_model_builder/split_on_line.xml
+0
-44
master/bt5/slapos_accounting/PathTemplateItem/portal_rules/slapos_invoice_transaction_simulation_rule/quantity_tester.xml
...s_invoice_transaction_simulation_rule/quantity_tester.xml
+3
-1
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
...ccounting/TestTemplateItem/testSlapOSAccountingBuilder.py
+29
-5
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder.xml
View file @
177b4dd3
...
@@ -84,7 +84,10 @@
...
@@ -84,7 +84,10 @@
<item>
<item>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<value>
<value>
<tuple/>
<tuple>
<string>
calculateAddQuantity
</string>
<string>
calculateAveragePrice
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/category_movement_group_on_line.xml
View file @
177b4dd3
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
int_index
</string>
</key>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
...
...
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/property_movement_group_on_line.xml
View file @
177b4dd3
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
int_index
</string>
</key>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
3
</int>
</value>
<value>
<int>
2
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
...
...
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_builder/split_on_line.xml
deleted
100644 → 0
View file @
cb16f458
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Split Movement Group"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
collect_order_group/line
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
split_on_line
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Split Movement Group
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder.xml
View file @
177b4dd3
...
@@ -84,7 +84,10 @@
...
@@ -84,7 +84,10 @@
<item>
<item>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<value>
<value>
<tuple/>
<tuple>
<string>
calculateAddQuantity
</string>
<string>
calculateSeparatePrice
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/slapos_accounting/PathTemplateItem/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder/split_on_line.xml
deleted
100644 → 0
View file @
cb16f458
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Split Movement Group"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
collect_order_group/line
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
split_on_line
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Split Movement Group
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/PathTemplateItem/portal_rules/slapos_invoice_transaction_simulation_rule/quantity_tester.xml
View file @
177b4dd3
...
@@ -58,7 +58,9 @@
...
@@ -58,7 +58,9 @@
<item>
<item>
<key>
<string>
categories
</string>
</key>
<key>
<string>
categories
</string>
</key>
<value>
<value>
<tuple/>
<tuple>
<string>
solver/portal_solvers/Automatic Quantity Adopt Solver
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
View file @
177b4dd3
...
@@ -314,6 +314,11 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -314,6 +314,11 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
[
delivery_2
.
getRelativeUrl
()]),
**
invoice_kw
)
[
delivery_2
.
getRelativeUrl
()]),
**
invoice_kw
)
class
TestSlapOSSaleInvoiceTransactionBuilder
(
TestSlapOSSalePackingListBuilder
):
class
TestSlapOSSaleInvoiceTransactionBuilder
(
TestSlapOSSalePackingListBuilder
):
def
checkSimulationMovement
(
self
,
simulation_movement
):
self
.
assertNotEqual
(
0.0
,
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
0.0
,
simulation_movement
.
getDeliveryError
())
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
def
test
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
@@ -691,14 +696,15 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -691,14 +696,15 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
transaction_line
.
getCategoryList
()
transaction_line
.
getCategoryList
()
)
)
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
transaction_line
.
getQuantity
())
transaction_line
.
getQuantity
()
*
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
transaction_line
.
getPrice
())
transaction_line
.
getPrice
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertEqual
([],
transaction_line
.
contentValues
(
self
.
assertEqual
([],
transaction_line
.
contentValues
(
portal_type
=
'Delivery Cell'
))
portal_type
=
'Delivery Cell'
))
self
.
assert
SameSet
([
simulation_movement
.
getRelativeUrl
()],
self
.
assert
True
(
simulation_movement
.
getRelativeUrl
()
in
transaction_line
.
getDeliveryRelatedList
(
transaction_line
.
getDeliveryRelatedList
(
portal_type
=
'Simulation Movement'
))
portal_type
=
'Simulation Movement'
))
...
@@ -778,6 +784,11 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -778,6 +784,11 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule
.
getPath
())
self
.
tic
()
self
.
tic
()
# as invoice_1 has been updated it is time to update its causality
# with automatic solving
invoice_1
.
updateCausalityState
(
solve_automatically
=
True
)
self
.
tic
()
self
.
checkSimulationMovement
(
transaction_movement_1_rec_bis2
)
self
.
checkSimulationMovement
(
transaction_movement_1_rec_bis2
)
transaction_line_1_rec_bis2
=
transaction_movement_1_rec_bis2
\
transaction_line_1_rec_bis2
=
transaction_movement_1_rec_bis2
\
.
getDeliveryValue
()
.
getDeliveryValue
()
...
@@ -798,11 +809,17 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -798,11 +809,17 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self
.
assertEqual
(
invoice_1
.
getRelativeUrl
(),
self
.
assertEqual
(
invoice_1
.
getRelativeUrl
(),
transation_model_line_1_rec_bis2
.
getParentValue
().
getRelativeUrl
())
transation_model_line_1_rec_bis2
.
getParentValue
().
getRelativeUrl
())
checkTransactionedInvoice
(
invoice_1
)
self
.
assertEqual
(
'solved'
,
invoice_1
.
getCausalityState
())
self
.
assertEqual
(
'confirmed'
,
invoice_1
.
getSimulationState
())
self
.
assertEqual
(
'solved'
,
invoice_2
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
invoice_2
.
getCausalityState
())
self
.
assertEqual
(
'confirmed'
,
invoice_2
.
getSimulationState
())
self
.
assertEqual
(
'confirmed'
,
invoice_2
.
getSimulationState
())
class
TestSlapOSSaleInvoiceTransactionTradeModelBuilder
(
TestSlapOSSalePackingListBuilder
):
class
TestSlapOSSaleInvoiceTransactionTradeModelBuilder
(
TestSlapOSSalePackingListBuilder
):
def
checkSimulationMovement
(
self
,
simulation_movement
):
self
.
assertNotEqual
(
0.0
,
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
0.0
,
simulation_movement
.
getDeliveryError
())
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
def
test
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
@@ -995,14 +1012,15 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -995,14 +1012,15 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
transaction_line
.
getCategoryList
()
transaction_line
.
getCategoryList
()
)
)
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
transaction_line
.
getQuantity
())
transaction_line
.
getQuantity
()
*
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
transaction_line
.
getPrice
())
transaction_line
.
getPrice
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertEqual
([],
transaction_line
.
contentValues
(
self
.
assertEqual
([],
transaction_line
.
contentValues
(
portal_type
=
'Delivery Cell'
))
portal_type
=
'Delivery Cell'
))
self
.
assert
SameSet
([
simulation_movement
.
getRelativeUrl
()],
self
.
assert
True
(
simulation_movement
.
getRelativeUrl
()
in
transaction_line
.
getDeliveryRelatedList
(
transaction_line
.
getDeliveryRelatedList
(
portal_type
=
'Simulation Movement'
))
portal_type
=
'Simulation Movement'
))
...
@@ -1037,6 +1055,12 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -1037,6 +1055,12 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule
.
getPath
())
self
.
tic
()
self
.
tic
()
# as invoice_1 has been updated it is time to update its causality
# with automatic solving
invoice_1
.
updateCausalityState
(
solve_automatically
=
True
)
self
.
tic
()
self
.
checkSimulationMovement
(
model_movement_1_tax_bis
)
self
.
checkSimulationMovement
(
model_movement_1_tax_bis
)
model_line_1_tax_bis
=
model_movement_1_tax_bis
.
getDeliveryValue
()
model_line_1_tax_bis
=
model_movement_1_tax_bis
.
getDeliveryValue
()
checkModelLine
(
model_movement_1_tax_bis
,
model_line_1_tax_bis
,
[
checkModelLine
(
model_movement_1_tax_bis
,
model_line_1_tax_bis
,
[
...
...
master/bt5/slapos_accounting/bt/revision
View file @
177b4dd3
156
157
\ 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