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
cb9334d4
Commit
cb9334d4
authored
Nov 09, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Change default Invoice List view
See merge request
!445
parents
0173ec07
a402c1f3
Changes
32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1984 additions
and
65 deletions
+1984
-65
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.py
...nting/AccountingTransactionModule_getUnpaidInvoiceList.py
+18
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.xml
...ting/AccountingTransactionModule_getUnpaidInvoiceList.xml
+62
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/WebSection_getHostingJSPrecacheManifestList.py
...lapos_base/WebSection_getHostingJSPrecacheManifestList.py
+2
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html.html
...dule/rjs_gadget_erp5_page_slap_all_invoice_list_html.html
+29
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html.xml
...odule/rjs_gadget_erp5_page_slap_all_invoice_list_html.xml
+336
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js.js
...e_module/rjs_gadget_erp5_page_slap_all_invoice_list_js.js
+214
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js.xml
..._module/rjs_gadget_erp5_page_slap_all_invoice_list_js.xml
+332
-0
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
+18
-13
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
+4
-1
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/PathTemplateItem/web_page_module/rjs_gadget_slapos_header_js.js
...mplateItem/web_page_module/rjs_gadget_slapos_header_js.js
+3
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_invoice_state_js.js
...tem/web_page_module/rjs_gadget_slapos_invoice_state_js.js
+12
-19
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_invoice_state_js.xml
...em/web_page_module/rjs_gadget_slapos_invoice_state_js.xml
+2
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/AccountingTransaction_getPaymentStateAsHateoas.py
...n_style/AccountingTransaction_getPaymentStateAsHateoas.py
+3
-5
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_state.xml
...SaleInvoiceTransaction_viewAsHateoas/my_payment_state.xml
+124
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_transaction.xml
...voiceTransaction_viewAsHateoas/my_payment_transaction.xml
+124
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
...aleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
+1
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
...le/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
+1
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
...e/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
+9
-3
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+2
-0
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+2
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
...eItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
+73
-2
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.xml
...portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.xml
+58
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.zpt
...portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.zpt
+340
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.py
...os_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.py
+22
-6
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.xml
...s_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.xml
+1
-1
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList.py
...eInvoiceTransaction_forceBuildSlapOSAccountingLineList.py
+25
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList.xml
...InvoiceTransaction_forceBuildSlapOSAccountingLineList.xml
+70
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_setFakeGroupingReference.py
...i_test/SaleInvoiceTransaction_setFakeGroupingReference.py
+10
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_setFakeGroupingReference.xml
..._test/SaleInvoiceTransaction_setFakeGroupingReference.xml
+70
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
...ortal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
+13
-5
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.py
0 → 100644
View file @
cb9334d4
portal
=
context
.
getPortalObject
()
portal_membership
=
portal
.
portal_membership
user
=
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
def
wrapWithShadow
():
return
[
i
.
getCausalityValue
(
portal_type
=
"Sale Invoice Transaction"
)
for
i
in
context
.
getPortalObject
().
portal_catalog
(
portal_type
=
"Payment Transaction"
,
simulation_state
=
"started"
,
destination_section_uid
=
user
.
getUid
(),
default_causality_portal_type
=
"Sale Invoice Transaction"
,
default_causality_simulation_state
=
(
"stopped"
,
"delivered"
),
)]
return
user
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
user
,
callable_object
=
wrapWithShadow
,
argument_list
=
[])
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.xml
0 → 100644
View file @
cb9334d4
<?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>
AccountingTransactionModule_getUnpaidInvoiceList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/WebSection_getHostingJSPrecacheManifestList.py
View file @
cb9334d4
...
...
@@ -79,6 +79,8 @@ url_list = [
"gadget_slapos_annotated_helper.js"
,
"gadget_slapos_annotated_helper.html"
,
"gadget_slapos_annotated_helper.css"
,
"gadget_erp5_page_slap_all_invoice_list.html"
,
"gadget_erp5_page_slap_all_invoice_list.js"
,
"gadget_erp5_page_slap_invoice_list.html"
,
"gadget_erp5_page_slap_invoice_list.js"
,
"gadget_erp5_page_slap_load_schema.html"
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html.html
0 → 100644
View file @
cb9334d4
<!DOCTYPE html>
<html>
<!--
data-i18n=Date
data-i18n=Price
data-i18n=Currency
data-i18n=Payment
data-i18n=Download
data-i18n=Invoices
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
Site List
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_slapos_utils.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_slap_all_invoice_list.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"gadget_erp5_pt_form_list.html"
data-gadget-scope=
"form_list"
></div>
</body>
</html>
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html.xml
0 → 100644
View file @
cb9334d4
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js.js
0 → 100644
View file @
cb9334d4
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
value
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
start_date
"
))
{
value
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
start_date
);
result
.
data
.
rows
[
i
].
value
.
start_date
=
{
"
field_gadget_param
"
:
{
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
date_only
:
true
,
description
:
"
The Date
"
,
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
value
.
toUTCString
(),
key
:
"
date
"
,
required
:
0
,
timezone_style
:
0
,
title
:
"
Date
"
,
type
:
"
DateTimeField
"
}
};
}
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
].
value
.
AccountingTransaction_getPaymentStateAsHateoas
;
result
.
data
.
rows
[
i
].
value
.
AccountingTransaction_getPaymentStateAsHateoas
=
{
field_gadget_param
:
{
css_class
:
""
,
description
:
"
Payment State
"
,
hidden
:
0
,
"
default
"
:
value
,
key
:
"
translated_simulation_state_title
"
,
url
:
"
gadget_slapos_invoice_state.html
"
,
title
:
"
Payment State
"
,
type
:
"
GadgetField
"
}
};
result
.
data
.
rows
[
i
].
value
.
download
=
{
field_gadget_param
:
{
css_class
:
""
,
description
:
"
Download Invoice
"
,
hidden
:
0
,
"
default
"
:
{
jio_key
:
result
.
data
.
rows
[
i
].
id
},
key
:
"
download
"
,
url
:
"
gadget_slapos_invoice_printout.html
"
,
title
:
"
Download
"
,
type
:
"
GadgetField
"
}
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
key
:
"
listbox_uid:list
"
,
value
:
2713
};
}
}
return
result
;
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
var
argument_list
=
arguments
;
return
this
.
getDeclaredGadget
(
'
form_list
'
)
.
push
(
function
(
gadget
)
{
return
gadget
.
triggerSubmit
.
apply
(
gadget
,
argument_list
);
});
})
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
lines_limit
,
invoices_translation
,
translation_list
=
[
"
Date
"
,
"
Price
"
,
"
Currency
"
,
"
Payment
"
,
"
Download
"
,
"
Invoices
"
,
"
Reference
"
];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_list
'
),
gadget
.
getSetting
(
"
listbox_lines_limit
"
,
20
),
gadget
.
getTranslationList
(
translation_list
)
]);
})
.
push
(
function
(
result
)
{
var
column_list
=
[
[
'
reference
'
,
result
[
2
][
6
]],
[
'
start_date
'
,
result
[
2
][
0
]],
[
'
total_price
'
,
result
[
2
][
1
]],
[
'
resource_reference
'
,
result
[
2
][
2
]],
[
'
AccountingTransaction_getPaymentStateAsHateoas
'
,
result
[
2
][
3
]],
[
'
download
'
,
result
[
2
][
4
]]
],
form_list
=
result
[
0
];
lines_limit
=
result
[
1
];
invoices_translation
=
result
[
2
][
5
];
return
form_list
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
0
,
"
editable_column_list
"
:
[],
"
key
"
:
"
slap_invoice_listbox
"
,
"
lines
"
:
lines_limit
,
"
list_method
"
:
"
portal_catalog
"
,
// XXX FIX ME: Missing default_destination_section_uid=person.getUid()
"
query
"
:
"
urn:jio:allDocs?query=(NOT%20title%3A%22Reversal%20Transaction%20for%20%25%22)%20AND%20(portal_type%3A%20%22Sale%20Invoice%20Transaction%22)
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
"
sort
"
:
[[
"
creation_date
"
,
"
descending
"
]],
"
title
"
:
invoices_translation
,
"
type
"
:
"
ListBox
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
bottom
"
,
[[
"
listbox
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
hateoas_url
"
),
window
.
getSettingMe
(
gadget
)
]);
})
.
push
(
function
(
url_list
)
{
return
RSVP
.
all
([
gadget
.
jio_getAttachment
(
"
contract_relative_url
"
,
url_list
[
0
]
+
url_list
[
1
]
+
"
/Person_getCloudContractRelated?return_json=True
"
),
gadget
.
updatePanel
({
jio_key
:
"
accounting_module
"
}),
gadget
.
getSetting
(
'
frontpage_gadget
'
)
]);
})
.
push
(
function
(
result
)
{
var
promise_list
=
[
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
result
[
2
]}}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
slap_rss_ticket
"
,
"
jio_key
"
:
"
accounting_module
"
}}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
'
slap_invoice_list
'
}})
];
if
(
result
[
0
])
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
jio_key
"
:
result
[
0
],
"
page
"
:
"
slap_controller
"
}})
);
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result
)
{
var
header_dict
=
{
page_title
:
invoices_translation
,
selection_url
:
result
[
0
],
tab_url
:
result
[
2
],
rss_url
:
result
[
1
],
filter_action
:
true
};
if
(
result
[
3
])
{
header_dict
.
contract_url
=
result
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
});
});
}(
window
,
rJS
,
RSVP
));
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js.xml
0 → 100644
View file @
cb9334d4
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.js
View file @
cb9334d4
...
...
@@ -52,13 +52,13 @@
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
=
{
value
=
result
.
data
.
rows
[
i
].
value
.
AccountingTransaction_getPaymentStateAsHateoas
;
result
.
data
.
rows
[
i
].
value
.
AccountingTransaction_getPaymentStateAsHateoas
=
{
field_gadget_param
:
{
css_class
:
""
,
description
:
"
Payment State
"
,
hidden
:
0
,
"
default
"
:
{
jio_key
:
value
}
,
"
default
"
:
value
,
key
:
"
translated_simulation_state_title
"
,
url
:
"
gadget_slapos_invoice_state.html
"
,
title
:
"
Payment State
"
,
...
...
@@ -70,7 +70,7 @@
css_class
:
""
,
description
:
"
Download Invoice
"
,
hidden
:
0
,
"
default
"
:
{
jio_key
:
value
},
"
default
"
:
{
jio_key
:
result
.
data
.
rows
[
i
].
id
},
key
:
"
download
"
,
url
:
"
gadget_slapos_invoice_printout.html
"
,
title
:
"
Download
"
,
...
...
@@ -116,7 +116,8 @@
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_list
'
),
gadget
.
getSetting
(
"
listbox_lines_limit
"
,
20
),
gadget
.
getTranslationList
(
translation_list
)
gadget
.
getTranslationList
(
translation_list
),
gadget
.
getSetting
(
'
hateoas_url
'
)
]);
})
.
push
(
function
(
result
)
{
...
...
@@ -125,7 +126,7 @@
[
'
start_date
'
,
result
[
2
][
0
]],
[
'
total_price
'
,
result
[
2
][
1
]],
[
'
resource_reference
'
,
result
[
2
][
2
]],
[
'
translated_simulation_state_title
'
,
result
[
2
][
3
]],
[
'
AccountingTransaction_getPaymentStateAsHateoas
'
,
result
[
2
][
3
]],
[
'
download
'
,
result
[
2
][
4
]]
],
form_list
=
result
[
0
];
...
...
@@ -142,9 +143,11 @@
"
editable_column_list
"
:
[],
"
key
"
:
"
slap_invoice_listbox
"
,
"
lines
"
:
lines_limit
,
"
list_method
"
:
"
portal_catalog
"
,
// XXX FIX ME: Missing default_destination_section_uid=person.getUid()
"
query
"
:
"
urn:jio:allDocs?query=(NOT%20title%3A%22Reversal%20Transaction%20for%20%25%22)%20AND%20(portal_type%3A%20%22Sale%20Invoice%20Transaction%22)
"
,
"
list_method
"
:
"
AccountingTransactionModule_getUnpaidInvoiceList
"
,
"
list_method_template
"
:
result
[
3
]
+
"
ERP5Document_getHateoas?mode=search&
"
+
"
list_method=AccountingTransactionModule_getUnpaidInvoiceList
"
+
"
&relative_url=accounting_module{&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
,
...
...
@@ -186,7 +189,8 @@
var
promise_list
=
[
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
result
[
2
]}}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
slap_rss_ticket
"
,
"
jio_key
"
:
"
accounting_module
"
}})
"
jio_key
"
:
"
accounting_module
"
}}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
'
slap_all_invoice_list
'
}})
];
if
(
result
[
0
])
{
promise_list
.
push
(
...
...
@@ -200,13 +204,14 @@
var
header_dict
=
{
page_title
:
invoices_translation
,
selection_url
:
result
[
0
],
list_all_url
:
result
[
2
],
rss_url
:
result
[
1
],
filter_action
:
true
};
if
(
result
[
2
])
{
header_dict
.
contract_url
=
result
[
2
];
if
(
result
[
3
])
{
header_dict
.
contract_url
=
result
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
));
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js.xml
View file @
cb9334d4
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
1.59414.5078.174
76
</string>
</value>
<value>
<string>
100
4.6631.33059.117
76
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
16
59068942.39
</float>
<float>
16
67930581.61
</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 @
cb9334d4
...
...
@@ -158,7 +158,10 @@
"
my_payment_state
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
5
],
"
default
"
:
{
jio_key
:
gadget
.
state
.
jio_key
},
"
default
"
:
{
state
:
gadget
.
state
.
doc
.
payment_state
,
payment_transaction
:
gadget
.
state
.
doc
.
payment_transaction
},
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.xml
View file @
cb9334d4
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
99
2.11149.35424.21572
</string>
</value>
<value>
<string>
99
9.2068.62564.17
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
16
21448974.82
</float>
<float>
16
67919626.06
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_header_js.js
View file @
cb9334d4
...
...
@@ -56,7 +56,8 @@
[
'
transfer_url
'
,
'
Transfer
'
,
'
exchange
'
],
[
'
accept_url
'
,
'
Accept
'
,
'
check-circle
'
],
[
'
reject_url
'
,
'
Reject
'
,
'
ban
'
],
[
'
contract_url
'
,
'
Contract
'
,
'
usd
'
]
[
'
contract_url
'
,
'
Contract
'
,
'
usd
'
],
[
'
list_all_url
'
,
'
Show all
'
,
'
eye
'
]
],
header_button_template
=
function
(
data
)
{
// <form><button name='{{name}}' data-i18n="{{title}}" type='submit' class='ui-icon-{{icon}} ui-btn-icon-left {{class}}'>{{title}}</button></form>
...
...
@@ -428,4 +429,4 @@
throw
new
Error
(
"
Unsupported button
"
+
name
);
});
}(
window
,
rJS
,
document
,
RSVP
));
\ No newline at end of file
}(
window
,
rJS
,
document
,
RSVP
));
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_invoice_state_js.js
View file @
cb9334d4
/*globals console, window, rJS,
RSVP,
domsugar */
/*globals console, window, rJS, domsugar */
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
rJS
,
domsugar
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
getTranslationDict
"
,
"
getTranslationDict
"
)
.
declareMethod
(
"
getContent
"
,
function
()
{
...
...
@@ -16,42 +14,37 @@
link
;
return
gadget
.
getTranslationDict
([
'
Pay Now
'
])
.
push
(
function
(
translation_dict
)
{
if
(
gadget
.
state
.
payment_transaction
!==
null
)
{
if
((
gadget
.
state
.
payment_transaction
!==
null
)
&&
(
gadget
.
state
.
payment_transaction
!==
undefined
))
{
link
=
domsugar
(
"
li
"
,
{},
[
domsugar
(
"
a
"
,
{
class
:
"
ui-btn ui-first-child ui-btn-icon-center
"
,
// XXX Translation
text
:
translation_dict
[
"
Pay Now
"
],
href
:
gadget
.
state
.
hateoas_url
+
gadget
.
state
.
payment_transaction
+
href
:
gadget
.
state
.
hateoas_url
+
gadget
.
state
.
payment_transaction
+
"
/PaymentTransaction_redirectToManualSlapOSPayment
"
})
]);
}
else
{
link
=
domsugar
(
"
li
"
,
{
"
text
"
:
gadget
.
state
.
payment_
transaction
});
link
=
domsugar
(
"
li
"
,
{
"
text
"
:
gadget
.
state
.
payment_
state
});
}
domsugar
(
gadget
.
element
,
{},
[
domsugar
(
"
ul
"
,
{
"
class
"
:
"
grid-items
"
},
[
link
])
]);
return
translation_dict
;
})
})
;
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
hateoas_url
)
{
// XXX RAFAEL this should comes from the options and not from a query like this.
return
gadget
.
jio_getAttachment
(
options
.
value
.
jio_key
,
hateoas_url
+
options
.
value
.
jio_key
+
"
/AccountingTransaction_getPaymentStateAsHateoas
"
)
.
push
(
function
(
state
)
{
return
gadget
.
changeState
({
payment_transaction
:
state
.
payment_transaction
,
payment_state
:
state
.
state
,
hateoas_url
:
hateoas_url
});
});
return
gadget
.
changeState
({
payment_transaction
:
options
.
value
.
payment_transaction
,
payment_state
:
options
.
value
.
state
,
hateoas_url
:
hateoas_url
});
});
});
}(
window
,
rJS
,
domsugar
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_invoice_state_js.xml
View file @
cb9334d4
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
0.58215.43208.28603
</string>
</value>
<value>
<string>
100
4.12353.6622.1501
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
16
55125229.22
</float>
<float>
16
67929052.34
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/AccountingTransaction_getPaymentStateAsHateoas.py
View file @
cb9334d4
import
json
state
=
context
.
AccountingTransaction_getPaymentState
()
payment_transaction
=
None
payment_mode
=
None
...
...
@@ -8,6 +6,6 @@ if state == "Pay now":
payment_transaction
=
payment_transaction_value
.
getRelativeUrl
()
payment_mode
=
payment_transaction_value
.
getPaymentMode
()
return
json
.
dumps
(
{
"state"
:
context
.
Base_translateString
(
state
),
"payment_mode"
:
payment_mode
,
"payment_transaction"
:
payment_transaction
})
return
{
"state"
:
context
.
Base_translateString
(
state
),
"payment_mode"
:
payment_mode
,
"payment_transaction"
:
payment_transaction
}
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_state.xml
0 → 100644
View file @
cb9334d4
<?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_payment_state
</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>
Payment State
</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: context.Base_translateString(context.AccountingTransaction_getPaymentState())
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_transaction.xml
0 → 100644
View file @
cb9334d4
<?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_payment_transaction
</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>
Payment Transaction
</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: context.SaleInvoiceTransaction_getSlapOSPaymentRelated()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_resource_title.xml
View file @
cb9334d4
...
...
@@ -85,7 +85,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Re
feren
ce
</string>
</value>
<value>
<string>
Re
sour
ce
</string>
</value>
</item>
</dictionary>
</value>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_start_date.xml
View file @
cb9334d4
...
...
@@ -100,7 +100,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Referenc
e
</string>
</value>
<value>
<string>
Start Dat
e
</string>
</value>
</item>
</dictionary>
</value>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_total_price.xml
View file @
cb9334d4
...
...
@@ -9,7 +9,9 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
...
...
@@ -71,16 +73,20 @@
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
title
</string>
</value>
<value>
<string>
my_
string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_view
Web
FieldLibrary
</string>
</value>
<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>
Total Price
</string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
cb9334d4
...
...
@@ -37,6 +37,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html
web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
...
...
master/bt5/slapos_jio/bt/template_path_list
View file @
cb9334d4
...
...
@@ -34,6 +34,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html
web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
View file @
cb9334d4
...
...
@@ -60,11 +60,52 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/access_menu_item"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})"
>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(0)', 'footer': 'No records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr>
<td
colspan=
"3"
><b
tal:content=
"python: 'Click on Show all'"
>
Menu Item
</b></td>
</tr>
<tal:block
define=
"menu_action python: 'Show all'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_invoice_state.html\')]//li[text()=\'%s\']' % (here.Base_translateString('Paid', lang=lang))"
></td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_invoice_state.html\')]//li[text()=\'%s\']' % (here.Base_translateString('Paid', lang=lang))"
></td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, 'SaleInvoiceTransaction_viewSlapOSPrintout')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, 'SaleInvoiceTransaction_viewSlapOSPrintout')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, '/accounting_module/')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, '/accounting_module/')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//p[@data-date='2019-10-20']
</td>
...
...
@@ -125,6 +166,36 @@
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_invoice_state.html\')]//li[text()=\'%s\']' % (here.Base_translateString('Paid', lang=lang))"
></td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_invoice_state.html\')]//li[text()=\'%s\']' % (here.Base_translateString('Paid', lang=lang))"
></td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, 'SaleInvoiceTransaction_viewSlapOSPrintout')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, 'SaleInvoiceTransaction_viewSlapOSPrintout')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, '/accounting_module/')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_slapos_invoice_printout.html')]//a[contains(@href, '/accounting_module/')]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_logout"
/>
</tbody>
</table>
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.xml
0 → 100644
View file @
cb9334d4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testSlapOSJSInvoiceUnpaid
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoiceUnpaid.zpt
0 → 100644
View file @
cb9334d4
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.py
View file @
cb9334d4
...
...
@@ -19,10 +19,10 @@ def wrapWithShadow():
payment
.
confirm
()
payment
.
start
()
payment
.
stop
()
if
not
unpaid
:
payment
.
stop
()
payment
.
PaymentTransaction_generatePayzenId
()
payment
.
PaymentTransaction_generatePayzenId
()
template
=
portal
.
restrictedTraverse
(
portal
.
portal_preferences
.
getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate
())
current_invoice
=
template
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
...
@@ -42,9 +42,6 @@ def wrapWithShadow():
quantity
=
1
)
cell
.
setPrice
(
1
)
return
current_invoice
,
payment
current_invoice
,
payment
=
demo_user_functional
.
Person_restrictMethodAsShadowUser
(
...
...
@@ -53,10 +50,29 @@ current_invoice, payment = demo_user_functional.Person_restrictMethodAsShadowUse
argument_list
=
[])
payment
.
setCausalityValue
(
current_invoice
)
payment
.
setDestinationSectionValue
(
demo_user_functional
)
current_invoice
.
plan
()
current_invoice
.
confirm
()
current_invoice
.
startBuilding
()
current_invoice
.
reindexObject
()
current_invoice
.
stop
()
current_invoice
.
activate
(
after_method_id
=
"immediateReindexObject"
).
Delivery_manageBuildingCalculatingDelivery
()
current_invoice
.
activate
(
after_method_id
=
(
"immediateReindexObject"
,
"_updateSimulation"
,
"Delivery_manageBuildingCalculatingDelivery"
)
).
SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList
()
if
not
unpaid
:
current_invoice
.
activate
(
after_method_id
=
(
"immediateReindexObject"
,
"_updateSimulation"
,
"Delivery_manageBuildingCalculatingDelivery"
,
"SimulationMovement_buildSlapOS"
,
"SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList"
)
).
SaleInvoiceTransaction_setFakeGroupingReference
()
return
'Done.'
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createSlapOSFakeInvoiceForTestUser.xml
View file @
cb9334d4
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
unpaid=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList.py
0 → 100644
View file @
cb9334d4
kw
=
{}
select_dict
=
{
'delivery_uid'
:
None
}
kw
.
update
(
portal_type
=
'Simulation Movement'
,
# This is an optimisation to help mariadb selecting a better index
simulation_state
=
[
'draft'
,
'planned'
,
None
],
left_join_list
=
select_dict
.
keys
(),
delivery_uid
=
None
)
applied_rule
=
context
.
getCausalityRelated
(
portal_type
=
"Applied Rule"
)
for
simulation_movement
in
context
.
getPortalObject
().
portal_catalog
(
path
=
"%%%s%%"
%
applied_rule
,
**
kw
):
if
simulation_movement
.
getDelivery
()
is
not
None
:
# movement build but not indexed, so do nothing
continue
root_applied_rule
=
simulation_movement
.
getRootAppliedRule
()
root_applied_rule_path
=
root_applied_rule
.
getPath
()
business_link
=
simulation_movement
.
getCausalityValue
(
portal_type
=
'Business Link'
)
business_link
.
build
(
path
=
'%s/%%'
%
root_applied_rule_path
,
activate_kw
=
{
'tag'
:
"ForceBuild"
})
return
"Done."
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList.xml
0 → 100644
View file @
cb9334d4
<?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></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_forceBuildSlapOSAccountingLineList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_setFakeGroupingReference.py
0 → 100644
View file @
cb9334d4
portal
=
context
.
getPortalObject
()
def
isNodeFromLineReceivable
(
line
):
node_value
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
return
node_value
.
getAccountType
()
==
'asset/receivable'
for
line
in
context
.
getMovementList
(
portal
.
getPortalAccountingMovementTypeList
()):
if
isNodeFromLineReceivable
(
line
):
if
not
line
.
hasGroupingReference
():
line
.
setGroupingReference
(
'FAKEGROUPINGREFERENCE'
)
break
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/SaleInvoiceTransaction_setFakeGroupingReference.xml
0 → 100644
View file @
cb9334d4
<?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></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_setFakeGroupingReference
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
View file @
cb9334d4
...
...
@@ -1205,11 +1205,6 @@
<td colspan="3"><b> Create a fake invoice</b></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td tal:content="python:'${base_url}/ERP5Site_createSlapOSFakeInvoiceForTestUser'">.../ERP5Site_createSlapOSFakeInvoiceForTestUser</td>
...
...
@@ -1222,11 +1217,24 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
<tal:block metal:define-macro="create_fake_unpaid_invoice">
<tr>
<td colspan="3"><b> Create a fake UNPAID invoice</b></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td tal:content="python:'${base_url}/ERP5Site_createSlapOSFakeInvoiceForTestUser?unpaid=True'">.../ERP5Site_createSlapOSFakeInvoiceForTestUser</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
<tal:block metal:define-macro="check_contextual_help">
...
...
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