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
Léo-Paul Géneau
slapos.core
Commits
a74838cc
Commit
a74838cc
authored
May 18, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Display same information present on the printout
parent
70d396c4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
6 deletions
+142
-6
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.js
...gadget_erp5_page_slap_sale_invoice_transaction_view_js.js
+38
-4
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.xml
...adget_erp5_page_slap_sale_invoice_transaction_view_js.xml
+2
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList.py
...ransaction_getRelatedHostingSubscriptionReportLineList.py
+40
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList.xml
...ansaction_getRelatedHostingSubscriptionReportLineList.xml
+62
-0
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.js
View file @
a74838cc
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
@@ -64,26 +65,36 @@
...
@@ -64,26 +65,36 @@
"
Payment State
"
,
"
Payment State
"
,
"
Download
"
,
"
Download
"
,
"
Invoice:
"
,
"
Invoice:
"
,
"
Data updated.
"
"
Data updated.
"
,
"
Instance
"
,
"
From
"
,
"
To
"
,
"
Quantity
"
];
];
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
),
gadget
.
getDeclaredGadget
(
'
form_view
'
),
gadget
.
getTranslationList
(
translation_list
)
gadget
.
getTranslationList
(
translation_list
),
gadget
.
getSetting
(
"
hateoas_url
"
)
]);
]);
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
gadget
.
message_translation
=
result
[
1
][
8
];
gadget
.
message_translation
=
result
[
1
][
8
];
page_title_translation
=
result
[
1
][
7
];
page_title_translation
=
result
[
1
][
7
];
var
form_gadget
=
result
[
0
],
var
form_gadget
=
result
[
0
],
column_list
=
[
[
"
title
"
,
result
[
1
][
9
]],
[
"
start_date
"
,
result
[
1
][
10
]],
[
"
stop_date
"
,
result
[
1
][
11
]],
[
"
quantity
"
,
result
[
1
][
12
]]
],
start_date
=
new
Date
(
gadget
.
state
.
doc
.
start_date
),
start_date
=
new
Date
(
gadget
.
state
.
doc
.
start_date
),
total_price
=
window
.
parseFloat
(
gadget
.
state
.
doc
.
total_price
).
toFixed
(
2
);
total_price
=
window
.
parseFloat
(
gadget
.
state
.
doc
.
total_price
).
toFixed
(
2
);
return
form_gadget
.
render
({
return
form_gadget
.
render
({
erp5_document
:
{
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_start_date
"
:
{
"
my_start_date
"
:
{
"
allow_empty_time
"
:
0
,
"
allow_empty_time
"
:
0
,
"
ampm_time_style
"
:
0
,
"
ampm_time_style
"
:
0
,
"
css_class
"
:
"
date_field
"
,
"
css_class
"
:
"
date_field
"
,
...
@@ -157,6 +168,26 @@
...
@@ -157,6 +168,26 @@
"
key
"
:
"
monitoring_status
"
,
"
key
"
:
"
monitoring_status
"
,
"
hidden
"
:
0
,
"
hidden
"
:
0
,
"
type
"
:
"
GadgetField
"
"
type
"
:
"
GadgetField
"
},
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
column_list
,
"
key
"
:
"
listbox
"
,
"
lines
"
:
20
,
"
list_method
"
:
"
SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList
"
,
"
list_method_template
"
:
result
[
2
]
+
gadget
.
state
.
jio_key
+
"
/ERP5Document_getHateoas?mode=search&
"
+
"
list_method=SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList
"
+
"
{&query,select_list*,limit*,sort_on*,local_roles*}
"
,
"
query
"
:
"
urn:jio:allDocs?query=
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
"
sort
"
:
[[
"
start_date
"
,
"
ASC
"
]],
"
title
"
:
"
Subscriptions
"
,
"
type
"
:
"
ListBox
"
}
}
}},
}},
"
_links
"
:
{
"
_links
"
:
{
...
@@ -171,6 +202,9 @@
...
@@ -171,6 +202,9 @@
"
left
"
,
"
left
"
,
[[
"
my_start_date
"
],
[
"
my_reference
"
],
[
"
my_total_price
"
],
[[
"
my_start_date
"
],
[
"
my_reference
"
],
[
"
my_total_price
"
],
[
"
my_resource_title
"
],
[
'
my_payment_state
'
],
[
"
my_download
"
]]
[
"
my_resource_title
"
],
[
'
my_payment_state
'
],
[
"
my_download
"
]]
],[
"
bottom
"
,
[[
"
listbox
"
]]
]]
]]
}
}
});
});
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.xml
View file @
a74838cc
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
992.9
718.3353.42939
</string>
</value>
<value>
<string>
992.9
877.18647.54442
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
16213
64990.01
</float>
<float>
16213
77250.27
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList.py
0 → 100644
View file @
a74838cc
aggregated_reference
=
context
.
getCausalityReferenceList
(
portal_type
=
'Sale Packing List'
,
checked_permission
=
'View'
)
from
Products.ERP5Type.Document
import
newTempBase
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
if
not
aggregated_reference
:
return
[]
item_dict
=
[]
for
line
in
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List Line'
,
grouping_reference
=
aggregated_reference
,
default_resource_uid
=
portal
.
service_module
.
slapos_instance_subscription
.
getUid
(),
sort_on
=
[(
'default_aggregate_uid'
,
'ASC'
),
(
'movement.start_date'
,
'ASC'
)]):
item_relative_url
=
line
.
getAggregate
(
portal_type
=
'Hosting Subscription'
)
if
not
item_relative_url
:
continue
item_title
=
line
.
getAggregateTitle
(
portal_type
=
'Hosting Subscription'
)
start_date
=
line
.
getStartDate
()
stop_date
=
line
.
getStopDate
()
quantity
=
line
.
getQuantity
()
item_dict
.
setdefault
(
item_relative_url
,
[
item_title
,
start_date
,
stop_date
,
0
])
item_dict
.
update
({
item_relative_url
:
[
item_title
,
min
(
item_dict
[
item_relative_url
][
1
],
start_date
),
max
(
item_dict
[
item_relative_url
][
2
],
stop_date
),
sum
([
item_dict
[
item_relative_url
][
3
],
quantity
])]})
report_line_list
=
[]
for
relative_url
in
item_dict
:
title
,
start_date
,
stop_date
,
quantity
=
item_dict
[
relative_url
]
report_line_list
.
append
(
newTempBase
(
portal
,
relative_url
,
title
=
title
,
start_date
=
start_date
,
stop_date
=
stop_date
,
quantity
=
quantity
)
)
return
report_line_list
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList.xml
0 → 100644
View file @
a74838cc
<?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>
SaleInvoiceTransaction_getRelatedHostingSubscriptionReportLineList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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