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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
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
Show 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 @@
<item>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<value>
<tuple/>
<tuple>
<string>
calculateAddQuantity
</string>
<string>
calculateAveragePrice
</string>
</tuple>
</value>
</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 @@
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
<item>
<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 @@
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
3
</int>
</value>
<value>
<int>
2
</int>
</value>
</item>
<item>
<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 @@
<item>
<key>
<string>
delivery_cell_separate_order
</string>
</key>
<value>
<tuple/>
<tuple>
<string>
calculateAddQuantity
</string>
<string>
calculateSeparatePrice
</string>
</tuple>
</value>
</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 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
<tuple>
<string>
solver/portal_solvers/Automatic Quantity Adopt Solver
</string>
</tuple>
</value>
</item>
<item>
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
View file @
177b4dd3
...
...
@@ -314,6 +314,11 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
[
delivery_2
.
getRelativeUrl
()]),
**
invoice_kw
)
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
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
...
@@ -691,14 +696,15 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
transaction_line
.
getCategoryList
()
)
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
transaction_line
.
getQuantity
())
transaction_line
.
getQuantity
()
*
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
transaction_line
.
getPrice
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertEqual
([],
transaction_line
.
contentValues
(
portal_type
=
'Delivery Cell'
))
self
.
assert
SameSet
([
simulation_movement
.
getRelativeUrl
()],
self
.
assert
True
(
simulation_movement
.
getRelativeUrl
()
in
transaction_line
.
getDeliveryRelatedList
(
portal_type
=
'Simulation Movement'
))
...
...
@@ -778,6 +784,11 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
path
=
'%s/%%'
%
applied_rule
.
getPath
())
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
)
transaction_line_1_rec_bis2
=
transaction_movement_1_rec_bis2
\
.
getDeliveryValue
()
...
...
@@ -798,11 +809,17 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self
.
assertEqual
(
invoice_1
.
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
(
'confirmed'
,
invoice_2
.
getSimulationState
())
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
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
...
@@ -995,14 +1012,15 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
transaction_line
.
getCategoryList
()
)
self
.
assertEqual
(
simulation_movement
.
getQuantity
(),
transaction_line
.
getQuantity
())
transaction_line
.
getQuantity
()
*
simulation_movement
.
getDeliveryRatio
())
self
.
assertEqual
(
simulation_movement
.
getPrice
(),
transaction_line
.
getPrice
())
self
.
assertFalse
(
transaction_line
.
hasStartDate
())
self
.
assertFalse
(
transaction_line
.
hasStopDate
())
self
.
assertEqual
([],
transaction_line
.
contentValues
(
portal_type
=
'Delivery Cell'
))
self
.
assert
SameSet
([
simulation_movement
.
getRelativeUrl
()],
self
.
assert
True
(
simulation_movement
.
getRelativeUrl
()
in
transaction_line
.
getDeliveryRelatedList
(
portal_type
=
'Simulation Movement'
))
...
...
@@ -1037,6 +1055,12 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
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
)
model_line_1_tax_bis
=
model_movement_1_tax_bis
.
getDeliveryValue
()
checkModelLine
(
model_movement_1_tax_bis
,
model_line_1_tax_bis
,
[
...
...
master/bt5/slapos_accounting/bt/revision
View file @
177b4dd3
156
\ No newline at end of file
157
\ 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