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
31324c9f
Commit
31324c9f
authored
Jan 26, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_*: let's try to extend the list of trade condition search
parent
dd5bac43
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
152 additions
and
36 deletions
+152
-36
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_deliverStartedAggregatedSalePackingList.py
...counting/Alarm_deliverStartedAggregatedSalePackingList.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_startConfirmedAggregatedSalePackingList.py
...counting/Alarm_startConfirmedAggregatedSalePackingList.py
+8
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_startConfirmedAggregatedSubscriptionSalePackingList.py
...rm_startConfirmedAggregatedSubscriptionSalePackingList.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.py
...ng/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Base_testSlapOSValidTradeCondition.py
...s/slapos_accounting/Base_testSlapOSValidTradeCondition.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_deliverStartedAggregatedSalePackingList.py
...nting/Delivery_deliverStartedAggregatedSalePackingList.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_startConfirmedAggregatedSalePackingList.py
...nting/Delivery_startConfirmedAggregatedSalePackingList.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_stopConfirmedAggregatedSaleInvoiceTransaction.py
...Delivery_stopConfirmedAggregatedSaleInvoiceTransaction.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/ERP5Site_searchRelatedInheritedSpecialiseList.py
...counting/ERP5Site_searchRelatedInheritedSpecialiseList.py
+31
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/ERP5Site_searchRelatedInheritedSpecialiseList.xml
...ounting/ERP5Site_searchRelatedInheritedSpecialiseList.xml
+62
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
...pos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
+1
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
...ting/OrderBuilder_generateSlapOSAggregatedMovementList.py
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_selectSlapOSAggregatedDeliveryList.py
...unting/OrderBuilder_selectSlapOSAggregatedDeliveryList.py
+1
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getAggregatedSubscriptionSaleTradeConditionValue.py
...erson_getAggregatedSubscriptionSaleTradeConditionValue.py
+8
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.py
...ng/SalePackingList_jumpToRelatedGroupedSalePackingList.py
+1
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_postSlapOSAggregatedDeliveryBuilder.py
...ng/SalePackingList_postSlapOSAggregatedDeliveryBuilder.py
+10
-11
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
...omponents/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
+7
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_getRelatedAccountingTransactionList.py
...ubscriptionRequest_getRelatedAccountingTransactionList.py
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_verifyPaymentBalanceIsReady.py
...equest/SubscriptionRequest_verifyPaymentBalanceIsReady.py
+2
-2
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
...al_components/test.erp5.testSlapOSSubscriptionScenario.py
+4
-0
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_deliverStartedAggregatedSalePackingList.py
View file @
31324c9f
...
...
@@ -9,8 +9,8 @@ root_trade_condition_uid_list = [
trade_condition_uid_list
.
extend
(
root_trade_condition_uid_list
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
specialise_
_
uid
=
root_trade_condition_uid_list
,
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
root_trade_condition_uid_list
,
validation_state
=
"validated"
)])
portal
.
portal_catalog
.
searchAndActivate
(
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_startConfirmedAggregatedSalePackingList.py
View file @
31324c9f
...
...
@@ -16,11 +16,18 @@ def getAccountingDate(accounting_date):
accounting_date
=
params
.
get
(
'accounting_date'
,
DateTime
().
earliestTime
())
portal
=
context
.
getPortalObject
()
trade_condition_uid_list
=
[
portal
.
restrictedTraverse
(
portal
.
portal_preferences
.
getPreferredAggregatedSaleTradeCondition
()).
getUid
()]
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
trade_condition_uid_list
,
validation_state
=
"validated"
)])
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Sale Packing List'
,
simulation_state
=
'confirmed'
,
causality_state
=
'solved'
,
specialise_uid
=
portal
.
restrictedTraverse
(
portal
.
portal_preferences
.
getPreferredAggregatedSaleTradeCondition
()).
getUid
()
,
specialise_uid
=
trade_condition_uid_list
,
method_id
=
'Delivery_startConfirmedAggregatedSalePackingList'
,
activate_kw
=
{
'tag'
:
tag
},
**
{
'delivery.start_date'
:
Query
(
range
=
"max"
,
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_startConfirmedAggregatedSubscriptionSalePackingList.py
View file @
31324c9f
...
...
@@ -12,9 +12,9 @@ root_trade_condition_uid = root_trade_condition_value.getUid()
trade_condition_uid_list
.
append
(
root_trade_condition_uid
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
root_trade_condition_value
.
getPortalType
(),
specialise_
_
uid
=
root_trade_condition_uid
,
specialise_uid
=
root_trade_condition_uid
,
validation_state
=
"validated"
)])
portal
.
portal_catalog
.
searchAndActivate
(
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.py
View file @
31324c9f
...
...
@@ -12,9 +12,9 @@ root_trade_condition_uid_list = [
trade_condition_uid_list
.
extend
(
root_trade_condition_uid_list
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
"Sale Trade Condition"
,
specialise_
_
uid
=
root_trade_condition_uid_list
,
specialise_uid
=
root_trade_condition_uid_list
,
validation_state
=
"validated"
)])
portal
.
portal_catalog
.
searchAndActivate
(
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Base_testSlapOSValidTradeCondition.py
View file @
31324c9f
...
...
@@ -13,7 +13,7 @@ specialise_uid = [
]
return
context
.
getSpecialiseUid
()
in
[
i
.
uid
for
i
in
portal
.
portal_catalog
(
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
"Sale Trade Condition"
,
specialise_
_
uid
=
specialise_uid
,
specialise_uid
=
specialise_uid
,
validation_state
=
"validated"
)]
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_deliverStartedAggregatedSalePackingList.py
View file @
31324c9f
...
...
@@ -21,8 +21,8 @@ if context.getSimulationState() == 'started' \
trade_condition_uid_list
.
extend
(
root_trade_condition_uid_list
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
specialise_
_
uid
=
root_trade_condition_uid_list
,
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
root_trade_condition_uid_list
,
validation_state
=
"validated"
)])
if
context
.
getSpecialiseUid
()
not
in
trade_condition_uid_list
:
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_startConfirmedAggregatedSalePackingList.py
View file @
31324c9f
...
...
@@ -24,8 +24,8 @@ if context.getSimulationState() == 'confirmed' \
trade_condition_uid_list
.
extend
(
root_trade_condition_uid_list
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
specialise_
_
uid
=
root_trade_condition_uid_list
,
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
root_trade_condition_uid_list
,
validation_state
=
"validated"
)])
if
context
.
getSpecialiseUid
()
not
in
trade_condition_uid_list
:
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_stopConfirmedAggregatedSaleInvoiceTransaction.py
View file @
31324c9f
...
...
@@ -21,9 +21,9 @@ if context.getSimulationState() == 'confirmed'\
trade_condition_uid_list
.
extend
(
root_trade_condition_uid_list
)
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
"Sale Trade Condition"
,
specialise_
_
uid
=
root_trade_condition_uid_list
,
specialise_uid
=
root_trade_condition_uid_list
,
validation_state
=
"validated"
)])
if
context
.
getSpecialiseUid
()
not
in
trade_condition_uid_list
:
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/ERP5Site_searchRelatedInheritedSpecialiseList.py
0 → 100644
View file @
31324c9f
portal
=
context
result_list
=
[]
if
specialise_uid
is
None
:
current_uid_list
=
[]
elif
same_type
(
specialise_uid
,
[])
or
same_type
(
specialise_uid
,
()):
current_uid_list
=
list
(
specialise_uid
)
else
:
current_uid_list
=
[
specialise_uid
]
search_kw
=
{}
if
portal_type
is
not
None
:
search_kw
[
'portal_type'
]
=
portal_type
if
validation_state
is
not
None
:
search_kw
[
'validation_state'
]
=
validation_state
if
destination_section__uid
is
not
None
:
search_kw
[
'destination_section__uid'
]
=
destination_section__uid
# This is REALLY INEFFICIENT.
# Keep it simple for now, as the goal is probably to drop all this script usage
while
(
current_uid_list
):
specialise__uid
=
current_uid_list
current_uid_list
=
[]
for
sql_result
in
portal
.
portal_catalog
(
specialise__uid
=
specialise__uid
,
**
search_kw
):
current_uid_list
.
append
(
sql_result
.
uid
)
result_list
.
append
(
sql_result
)
return
result_list
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/ERP5Site_searchRelatedInheritedSpecialiseList.xml
0 → 100644
View file @
31324c9f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
specialise_uid, portal_type=None, validation_state=None, destination_section__uid=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_searchRelatedInheritedSpecialiseList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
View file @
31324c9f
...
...
@@ -35,6 +35,7 @@ def newOpenOrder():
return
new_open_sale_order
if
instance_tree
.
getCausalityState
()
==
'diverged'
:
open_order
=
None
person
=
instance_tree
.
getDestinationSectionValue
(
portal_type
=
"Person"
)
# Template document does not have person relation
if
person
is
not
None
:
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
View file @
31324c9f
...
...
@@ -10,10 +10,10 @@ business_process_uid_list = [
portal
.
business_process_module
.
slapos_reservation_refound_business_process
.
getUid
(),
portal
.
business_process_module
.
slapos_subscription_business_process
.
getUid
()]
specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
portal_catalog
(
specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
business_process_uid_list
,
portal_type
=
'Sale Trade Condition'
)]
consumption_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
portal_catalog
(
consumption_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
portal
.
business_process_module
.
slapos_consumption_business_process
.
getUid
(),
portal_type
=
'Sale Trade Condition'
)]
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_selectSlapOSAggregatedDeliveryList.py
View file @
31324c9f
...
...
@@ -19,7 +19,7 @@ def newPackingList(movement, causality, message):
delivery
.
confirm
(
message
)
return
delivery
consumption_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
portal_catalog
(
consumption_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
portal
.
business_process_module
.
slapos_consumption_business_process
.
getUid
(),
portal_type
=
'Sale Trade Condition'
)]
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getAggregatedSubscriptionSaleTradeConditionValue.py
View file @
31324c9f
...
...
@@ -8,12 +8,18 @@ if root_trade_condition is None:
root_trade_condition_value
=
portal
.
restrictedTraverse
(
root_trade_condition
)
trade_condition
=
portal
.
portal_catalog
.
getResultValue
(
trade_condition
=
portal
.
portal_catalog
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
root_trade_condition_value
.
getPortalType
(),
specialise_
_
uid
=
root_trade_condition_value
.
getUid
(),
specialise_uid
=
root_trade_condition_value
.
getUid
(),
validation_state
=
root_trade_condition_value
.
getValidationState
(),
destination_section__uid
=
context
.
getUid
()
)
if
len
(
trade_condition
)
==
1
:
trade_condition
=
trade_condition
[
0
].
getObject
()
elif
len
(
trade_condition
)
==
0
:
trade_condition
=
None
else
:
raise
NotImplementedError
(
'Too many trade aggregated subscription trade condition for %s'
%
context
.
getRelativeUrl
())
if
trade_condition
is
not
None
:
return
trade_condition
.
getRelativeUrl
()
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.py
View file @
31324c9f
...
...
@@ -4,7 +4,7 @@ portal = context.getPortalObject()
business_process_uid_list
=
[
portal
.
business_process_module
.
slapos_subscription_business_process
.
getUid
()]
subscription_delivery_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
portal_catalog
(
subscription_delivery_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
business_process_uid_list
,
portal_type
=
'Sale Trade Condition'
)]
search_kw
=
{
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_postSlapOSAggregatedDeliveryBuilder.py
View file @
31324c9f
...
...
@@ -5,27 +5,26 @@ restrictedTraverse = portal.restrictedTraverse
person
=
context
.
getDestination
()
reference
=
context
.
getReference
()
business_process_uid_list
=
[
portal
.
business_process_module
.
slapos_reservation_refound_business_process
.
getUid
(),
portal
.
business_process_module
.
slapos_subscription_business_process
.
getUid
()]
business_process_list
=
[
portal
.
business_process_module
.
slapos_reservation_refound_business_process
,
portal
.
business_process_module
.
slapos_subscription_business_process
]
business_process_uid_list
=
[
x
.
getUid
()
for
x
in
business_process_list
]
specialise_list
=
[
q
.
getRelativeUrl
()
for
q
in
portal
.
portal_catalog
(
specialise_list
=
[
q
.
getRelativeUrl
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
business_process_uid_list
,
portal_type
=
'Sale Trade Condition'
)]
consumption_specialise_list
=
[
q
.
getRelativeUrl
()
for
q
in
portal
.
portal_catalog
(
consumption_specialise_list
=
[
q
.
getRelativeUrl
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
portal
.
business_process_module
.
slapos_consumption_business_process
.
getUid
(),
portal_type
=
'Sale Trade Condition'
)]
subscription_request_specialise
=
portal
.
portal_preferences
.
getPreferredAggregatedSubscriptionSaleTradeCondition
()
consumption_specialise
=
portal
.
portal_preferences
.
getPreferredAggregatedConsumptionSaleTradeCondition
()
trade_condition
=
context
.
getSpecialise
()
specialise_filter_list
=
consumption_specialise_list
+
specialise_list
if
trade_condition
==
consumption_specialise
:
if
trade_condition
in
consumption_specialise_list
:
specialise_filter_list
=
consumption_specialise_list
elif
trade_condition
==
subscription_request_specialise
:
elif
trade_condition
in
specialise_list
:
specialise_filter_list
=
specialise_list
else
:
specialise_filter_list
=
consumption_specialise_list
+
specialise_list
def
test_for_subscription
(
movement
,
causality
):
instance_tree
=
movement
.
getAggregateValue
(
portal_type
=
"Instance Tree"
)
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
View file @
31324c9f
...
...
@@ -594,9 +594,15 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
aggregated_delivery_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List'
,
default_destination_section_uid
=
person
.
getUid
(),
specialise_uid
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
\
specialise_uid
=
[
self
.
portal
.
restrictedTraverse
(
self
.
portal
\
.
portal_preferences
.
getPreferredAggregatedSaleTradeCondition
()
\
).
getUid
()
]
+
[
i
.
uid
for
i
in
self
.
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredAggregatedSaleTradeCondition
()
).
getUid
())
]
)
if
len
(
subscription_list
)
==
0
:
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_getRelatedAccountingTransactionList.py
View file @
31324c9f
...
...
@@ -10,7 +10,7 @@ else:
business_process_uid_list
=
[
portal
.
business_process_module
.
slapos_subscription_business_process
.
getUid
()]
subscription_delivery_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
portal_catalog
(
subscription_delivery_specialise_uid_list
=
[
q
.
getUid
()
for
q
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
business_process_uid_list
,
portal_type
=
'Sale Trade Condition'
)]
# Recover all Aggregated Sale Packing Lists
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_verifyPaymentBalanceIsReady.py
View file @
31324c9f
...
...
@@ -12,9 +12,9 @@ specialise_uid = portal.restrictedTraverse(
trade_condition_uid_list
=
[
specialise_uid
]
trade_condition_uid_list
.
extend
([
i
.
uid
for
i
in
portal
.
portal_catalog
(
i
.
uid
for
i
in
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
portal_type
=
"Sale Trade Condition"
,
specialise_
_
uid
=
specialise_uid
,
specialise_uid
=
specialise_uid
,
validation_state
=
"validated"
)])
# This is normally one, but we navegate in case
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
View file @
31324c9f
...
...
@@ -1167,6 +1167,10 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
person_uid
=
subscription_request
.
getDestinationSectionValue
().
getUid
()
specialise_uid
=
self
.
portal
.
restrictedTraverse
(
"sale_trade_condition_module/slapos_subscription_trade_condition"
).
getUid
()
specialise_uid
=
[
specialise_uid
]
+
[
i
.
uid
for
i
in
self
.
portal
.
ERP5Site_searchRelatedInheritedSpecialiseList
(
specialise_uid
=
specialise_uid
)
]
return
self
.
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List'
,
...
...
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