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
Xiaowu Zhang
slapos.core
Commits
3ecbfd4d
Commit
3ecbfd4d
authored
Feb 07, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Improvements for Invoice List and view
parent
dccdfcfd
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
377 additions
and
21 deletions
+377
-21
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.js
..._page_module/rjs_gadget_erp5_page_slap_invoice_list_js.js
+9
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.xml
...page_module/rjs_gadget_erp5_page_slap_invoice_list_js.xml
+2
-2
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
+42
-15
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_viewAsHateoas.xml
...s_hal_json_style/SaleInvoiceTransaction_viewAsHateoas.xml
+3
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
...aleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
+96
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
...le/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
+124
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
...e/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
+90
-0
master/bt5/slapos_jio/bt/template_action_path_list
master/bt5/slapos_jio/bt/template_action_path_list
+1
-0
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+4
-0
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+4
-0
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.js
View file @
3ecbfd4d
...
...
@@ -24,7 +24,7 @@
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
date_only
:
0
,
date_only
:
1
,
description
:
"
The Date
"
,
editable
:
0
,
hidden
:
0
,
...
...
@@ -38,6 +38,13 @@
};
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
total_price
"
))
{
value
=
window
.
parseFloat
(
result
.
data
.
rows
[
i
].
value
.
total_price
);
// The field seemms not set precision to display
value
=
value
.
toFixed
(
2
);
// round on this case for 2 digits as
// float field is bugged.
result
.
data
.
rows
[
i
].
value
.
total_price
=
value
;
}
if
(
1
||
(
result
.
data
.
rows
[
i
].
hasOwnProperty
(
"
id
"
)))
{
value
=
result
.
data
.
rows
[
i
].
id
;
result
.
data
.
rows
[
i
].
value
.
translated_simulation_state_title
=
{
...
...
@@ -94,9 +101,9 @@
})
.
push
(
function
(
form_list
)
{
var
column_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
start_date
'
,
'
Date
'
],
[
'
total_price
'
,
'
Price
'
],
[
'
resource_reference
'
,
'
Currency
'
],
[
'
translated_simulation_state_title
'
,
'
Payment
'
],
[
'
download
'
,
'
Download
'
]
];
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.xml
View file @
3ecbfd4d
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.60286.59381.65058
</string>
</value>
<value>
<string>
96
5.22041.26321.21384
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
151
6369858.23
</float>
<float>
151
8007364.17
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.js
View file @
3ecbfd4d
...
...
@@ -57,20 +57,26 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
var
start_date
=
new
Date
(
gadget
.
state
.
doc
.
start_date
),
total_price
=
window
.
parseFloat
(
gadget
.
state
.
doc
.
total_price
).
toFixed
(
2
);
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_
titl
e
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Title
"
,
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
my_
start_dat
e
"
:
{
"
allow_empty_time
"
:
0
,
"
ampm_time_style
"
:
0
,
"
css_class
"
:
"
date_field
"
,
"
date_only
"
:
1
,
"
description
"
:
"
The Date
"
,
"
editable
"
:
0
,
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
"
hidden_day_is_last_day
"
:
0
,
"
default
"
:
start_date
.
toUTCString
(),
"
key
"
:
"
date
"
,
"
required
"
:
0
,
"
timezone_style
"
:
0
,
"
title
"
:
"
Date
"
,
"
type
"
:
"
DateTimeField
"
},
"
my_reference
"
:
{
"
description
"
:
""
,
...
...
@@ -83,6 +89,28 @@
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_total_price
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Total
"
,
"
default
"
:
total_price
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
total_price
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_resource_title
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Currency
"
,
"
default
"
:
gadget
.
state
.
doc
.
resource_title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
resource_title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_payment_state
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Payment State
"
,
...
...
@@ -92,7 +120,7 @@
"
editable
"
:
0
,
"
url
"
:
"
gadget_slapos_invoice_state.html
"
,
"
sandbox
"
:
""
,
"
key
"
:
"
monitoring_status
"
,
"
key
"
:
"
payment_state
"
,
"
hidden
"
:
0
,
"
type
"
:
"
GadgetField
"
},
...
...
@@ -120,7 +148,8 @@
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
],
[
"
my_reference
"
],
[
'
my_payment_state
'
],
[
"
my_download
"
]]
[[
"
my_start_date
"
],
[
"
my_reference
"
],
[
"
my_total_price
"
],
[
"
my_resource_title
"
],
[
'
my_payment_state
'
],
[
"
my_download
"
]]
]]
}
});
...
...
@@ -131,10 +160,8 @@
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
page_title
:
gadget
.
state
.
doc
.
title
,
save_action
:
true
};
var
start_date
=
new
Date
(
gadget
.
state
.
doc
.
start_date
),
header_dict
=
{
page_title
:
"
Invoice :
"
+
start_date
.
toUTCString
()};
if
(
!
gadget
.
state
.
editable
)
{
header_dict
.
edit_content
=
url_list
[
0
];
}
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.xml
View file @
3ecbfd4d
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.64860.64104.58709
</string>
</value>
<value>
<string>
96
5.22103.26552.47598
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
151
6644362.67
</float>
<float>
151
8011453.92
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas.xml
View file @
3ecbfd4d
...
...
@@ -95,6 +95,9 @@
<list>
<string>
my_title
</string>
<string>
my_reference
</string>
<string>
my_start_date
</string>
<string>
my_total_price
</string>
<string>
my_resource_title
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
0 → 100644
View file @
3ecbfd4d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_resource_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Reference
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
0 → 100644
View file @
3ecbfd4d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_start_date
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Reference
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.getStartDate().strftime("%Y/%m/%d %H:%M:%S UTC")
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
0 → 100644
View file @
3ecbfd4d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_total_price
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewWebFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/bt/template_action_path_list
View file @
3ecbfd4d
...
...
@@ -17,6 +17,7 @@ Person | request_hateoas_hosting_subscription
Person | slaposjs_view
Project | slaposjs_view
Regularisation Request | slaposjs_view
Sale Invoice Transaction | slaposjs_view
Slave Instance | get_hateoas_information
Slave Instance | get_hateoas_news
Slave Instance | get_hateoas_related_hosting_subscription
...
...
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
3ecbfd4d
...
...
@@ -132,5 +132,9 @@ web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_slapos_payment_result_js
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_site_module/hostingjs
web_site_module/hostingjs/**
\ No newline at end of file
master/bt5/slapos_jio/bt/template_path_list
View file @
3ecbfd4d
...
...
@@ -51,6 +51,7 @@ web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html
...
...
@@ -67,6 +68,8 @@ web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_js
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_select_software_product_html
web_page_module/rjs_gadget_erp5_page_slap_select_software_product_js
web_page_module/rjs_gadget_erp5_page_slap_select_software_release_html
...
...
@@ -124,6 +127,7 @@ web_page_module/rjs_gadget_slapos_network_status_html
web_page_module/rjs_gadget_slapos_network_status_js
web_page_module/rjs_gadget_slapos_panel_html
web_page_module/rjs_gadget_slapos_panel_js
web_page_module/rjs_gadget_slapos_payment_result_js
web_page_module/rjs_gadget_slapos_project_status_html
web_page_module/rjs_gadget_slapos_project_status_js
web_page_module/rjs_gadget_slapos_site_status_html
...
...
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