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
Arnaud Véron
slapos.core
Commits
cf212c64
Commit
cf212c64
authored
Apr 08, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: Included jump between Subscription and Aggregated Packing Lists
This makes management easier.
parent
019f4001
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
368 additions
and
0 deletions
+368
-0
master/bt5/slapos_accounting/ActionTemplateItem/portal_types/Sale%20Packing%20List/jump_related_aggregated_packing_list.xml
...20Packing%20List/jump_related_aggregated_packing_list.xml
+96
-0
master/bt5/slapos_accounting/ActionTemplateItem/portal_types/Sale%20Packing%20List/jump_related_grouped_sale_packing_list.xml
...Packing%20List/jump_related_grouped_sale_packing_list.xml
+81
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedAggregatedSalePackingList.py
...SalePackingList_jumpToRelatedAggregatedSalePackingList.py
+24
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedAggregatedSalePackingList.xml
...alePackingList_jumpToRelatedAggregatedSalePackingList.xml
+62
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.py
...ng/SalePackingList_jumpToRelatedGroupedSalePackingList.py
+41
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.xml
...g/SalePackingList_jumpToRelatedGroupedSalePackingList.xml
+62
-0
master/bt5/slapos_accounting/bt/template_action_path_list
master/bt5/slapos_accounting/bt/template_action_path_list
+2
-0
No files found.
master/bt5/slapos_accounting/ActionTemplateItem/portal_types/Sale%20Packing%20List/jump_related_aggregated_packing_list.xml
0 → 100644
View file @
cf212c64
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_jump
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_jump
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jump_related_aggregated_packing_list
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
8.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Related Aggregated Sale Packing List
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/SalePackingList_jumpToRelatedAggregatedSalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: [ x.getGroupingReference() for x in context.objectValues() if x.getGroupingReference() is not None]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/ActionTemplateItem/portal_types/Sale%20Packing%20List/jump_related_grouped_sale_packing_list.xml
0 → 100644
View file @
cf212c64
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_jump
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_jump
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jump_related_grouped_sale_packing_list
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
8.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Related Grouped Sale Packing List Lines
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/SalePackingList_jumpToRelatedGroupedSalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedAggregatedSalePackingList.py
0 → 100644
View file @
cf212c64
grouping_reference
=
[
x
.
getGroupingReference
()
for
x
in
context
.
objectValues
()
if
x
.
getGroupingReference
()
is
not
None
]
assert
len
(
grouping_reference
)
in
[
0
,
1
],
"Too many grouping references"
if
not
grouping_reference
:
return
context
.
Base_redirect
(
"view"
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"No Packing List related."
)}
)
aggregated_spl_list
=
context
.
getPortalObject
().
portal_catalog
.
getResultValue
(
portal_type
=
"Sale Packing List"
,
reference
=
grouping_reference
)
if
not
aggregated_spl_list
:
return
context
.
Base_redirect
(
"view"
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"No Packing List related."
)}
)
return
aggregated_spl_list
.
Base_redirect
(
"view"
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"Related Sale Packing List Grouped"
)}
)
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedAggregatedSalePackingList.xml
0 → 100644
View file @
cf212c64
<?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>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SalePackingList_jumpToRelatedAggregatedSalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.py
0 → 100644
View file @
cf212c64
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
(
specialise_uid
=
business_process_uid_list
,
portal_type
=
'Sale Trade Condition'
)]
search_kw
=
{
'portal_type'
:
'Sale Packing List Line'
,
'simulation_state'
:
'delivered'
,
# Default Aggregate UID to the hosting subscription?
"parent_specialise_uid"
:
subscription_delivery_specialise_uid_list
,
'grouping_reference'
:
context
.
getReference
()}
related_line_list
=
portal
.
portal_catalog
(
**
search_kw
)
if
len
(
related_line_list
)
==
0
:
return
context
.
Base_redirect
(
"view"
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"No Packing List related."
)}
)
elif
len
(
related_line_list
)
==
1
:
related_line_list
[
0
].
Base_redirect
(
"view"
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"Related Grouped Sale Packing List"
)}
)
else
:
selection_uid_list
=
[
x
.
getUid
()
for
x
in
related_line_list
]
message
=
context
.
Base_translateString
(
"Documents related to %s."
%
context
.
getPortalType
(),
# if not found, fallback to generic translation
default
=
context
.
Base_translateString
(
'Documents related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),)
return
context
.
Base_redirect
(
"Base_jumpToRelatedObjectList"
,
keep_items
=
dict
(
reset
=
1
,
uid
=
selection_uid_list
,
portal_status_message
=
message
))
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SalePackingList_jumpToRelatedGroupedSalePackingList.xml
0 → 100644
View file @
cf212c64
<?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>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SalePackingList_jumpToRelatedGroupedSalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/bt/template_action_path_list
View file @
cf212c64
...
@@ -12,6 +12,8 @@ Person | create_new_cloud_contract
...
@@ -12,6 +12,8 @@ Person | create_new_cloud_contract
Person | jump_to_cloud_contract
Person | jump_to_cloud_contract
Root Applied Rule Causality Causality Movement Group | view
Root Applied Rule Causality Causality Movement Group | view
Sale Invoice Transaction | create_slapos_reversal
Sale Invoice Transaction | create_slapos_reversal
Sale Packing List | jump_related_aggregated_packing_list
Sale Packing List | jump_related_grouped_sale_packing_list
SlapOS Accounting Quantity Updating Order Builder | view
SlapOS Accounting Quantity Updating Order Builder | view
SlapOS Accounting Quantity Updating Order Builder | view_predicate_group
SlapOS Accounting Quantity Updating Order Builder | view_predicate_group
SlapOS Accounting Quantity Updating Order Builder | view_profile
SlapOS Accounting Quantity Updating Order Builder | view_profile
...
...
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