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
Roque
slapos.core
Commits
5b33911a
Commit
5b33911a
authored
Mar 08, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Relies on Sale Supplies for define pricing for Reservation.
parent
27dab6a3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
22 deletions
+30
-22
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_pre_payment_template/1.xml
...eItem/accounting_module/slapos_pre_payment_template/1.xml
+1
-1
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_pre_payment_template/2.xml
...eItem/accounting_module/slapos_pre_payment_template/2.xml
+1
-1
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/1.xml
...ccounting_module/slapos_wechat_pre_payment_template/1.xml
+1
-1
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/2.xml
...ccounting_module/slapos_wechat_pre_payment_template/2.xml
+1
-1
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_pre_payment_subscription_sale_invoice_transaction/1.xml
...e_pre_payment_subscription_sale_invoice_transaction/1.xml
+5
-1
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction/1.xml
...t_pre_payment_subscription_sale_invoice_transaction/1.xml
+5
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+16
-16
No files found.
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_pre_payment_template/1.xml
View file @
5b33911a
...
...
@@ -43,7 +43,7 @@
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
25
.0
</float>
</value>
<value>
<float>
0
.0
</float>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_pre_payment_template/2.xml
View file @
5b33911a
...
...
@@ -55,7 +55,7 @@
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
-25
.0
</float>
</value>
<value>
<float>
0
.0
</float>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/1.xml
View file @
5b33911a
...
...
@@ -43,7 +43,7 @@
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
188
.0
</float>
</value>
<value>
<float>
0
.0
</float>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/2.xml
View file @
5b33911a
...
...
@@ -55,7 +55,7 @@
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
-188
.0
</float>
</value>
<value>
<float>
0
.0
</float>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_pre_payment_subscription_sale_invoice_transaction/1.xml
View file @
5b33911a
...
...
@@ -6,6 +6,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
base_unit_price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
@@ -54,7 +58,7 @@
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
20.8333333333
</float>
</value>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
...
...
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction/1.xml
View file @
5b33911a
...
...
@@ -6,6 +6,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
base_unit_price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
@@ -53,7 +57,7 @@
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
188
.0
</float>
</value>
<value>
<float>
0
.0
</float>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
5b33911a
...
...
@@ -561,43 +561,43 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
if
line
.
getSource
()
==
"account_module/receivable"
:
self
.
assertEqual
(
line
.
getQuantity
(),
188
*
quantity
)
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
amount, tag, payment, target_languag
e, REQUEST=None'
,
"""assert REQUEST == None
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
price, tag, payment, templat
e, REQUEST=None'
,
"""assert REQUEST == None
assert payment
assert
amount == 1
assert
price == 20.8333333
assert tag == 'TAG'
assert t
arget_language == 'en'
"""
)
assert t
emplate == context.portal_preferences.getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate()
"""
)
def
test_request_payment_transaction_q1
(
self
):
self
.
_test_request_payment_transaction
(
quantity
=
1
)
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
amount, tag, payment, target_languag
e, REQUEST=None'
,
"""assert REQUEST == None
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
price, tag, payment, templat
e, REQUEST=None'
,
"""assert REQUEST == None
assert payment
assert
amount == 2
assert
price == 20.8333333
assert tag == 'TAG'
assert t
arget_language == 'en'
"""
)
assert t
emplate == context.portal_preferences.getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate()
"""
)
def
test_request_payment_transaction_q2
(
self
):
self
.
_test_request_payment_transaction
(
quantity
=
2
)
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
amount, tag, payment, target_languag
e, REQUEST=None'
,
"""assert REQUEST == None
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
price, tag, payment, templat
e, REQUEST=None'
,
"""assert REQUEST == None
assert payment
assert
amount == 10
assert
price == 20.8333333
assert tag == 'TAG'
assert t
arget_language == 'en'
"""
)
assert t
emplate == context.portal_preferences.getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate()
"""
)
def
test_request_payment_transaction_q10
(
self
):
self
.
_test_request_payment_transaction
(
quantity
=
10
)
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
amount, tag, payment, target_languag
e, REQUEST=None'
,
"""assert REQUEST == None
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
price, tag, payment, templat
e, REQUEST=None'
,
"""assert REQUEST == None
assert payment
assert
amount == 1
assert
price == 188
assert tag == 'TAG'
assert t
arget_language == 'zh'
"""
)
assert t
emplate == context.portal_preferences.getPreferredZhPrePaymentSubscriptionInvoiceTemplate()
"""
)
def
test_request_payment_transaction_chinese_q1
(
self
):
self
.
_test_request_payment_transaction_chinese
(
quantity
=
1
)
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
amount, tag, payment, target_languag
e, REQUEST=None'
,
"""assert REQUEST == None
@
simulate
(
'SubscriptionRequest_createRelatedSaleInvoiceTransaction'
,
'
price, tag, payment, templat
e, REQUEST=None'
,
"""assert REQUEST == None
assert payment
assert
amount == 10
assert
price == 188
assert tag == 'TAG'
assert t
arget_language == 'zh'
"""
)
assert t
emplate == context.portal_preferences.getPreferredZhPrePaymentSubscriptionInvoiceTemplate()
"""
)
def
test_request_payment_transaction_chinese_q10
(
self
):
self
.
_test_request_payment_transaction_chinese
(
quantity
=
10
)
...
...
@@ -621,7 +621,7 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti
subscription_request
.
edit
(
causality_value
=
current_invoice
)
self
.
assertEqual
(
current_invoice
,
subscription_request
.
SubscriptionRequest_createRelatedSaleInvoiceTransaction
(
1
,
"xx"
,
"___payment__"
,
"en"
))
subscription_request
.
SubscriptionRequest_createRelatedSaleInvoiceTransaction
(
1
,
"xx"
,
"___payment__"
,
invoice_template_path
))
def
_test_creation_of_related_sale_invoice_transaction
(
self
,
quantity
):
...
...
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