Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
6f975a16
Commit
6f975a16
authored
May 19, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Display reference to number on payzen/wechat receipt on the Invoice UI.
parent
a8c80c16
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
247 additions
and
4 deletions
+247
-4
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
+17
-2
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_getRelatedPaymentTransactionIntegrationId.py
...eTransaction_getRelatedPaymentTransactionIntegrationId.py
+33
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedPaymentTransactionIntegrationId.xml
...Transaction_getRelatedPaymentTransactionIntegrationId.xml
+70
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas.xml
...s_hal_json_style/SaleInvoiceTransaction_viewAsHateoas.xml
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_transaction_external_id.xml
...tion_viewAsHateoas/my_payment_transaction_external_id.xml
+124
-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 @
6f975a16
...
...
@@ -69,7 +69,8 @@
"
Instance
"
,
"
From
"
,
"
To
"
,
"
Quantity
"
"
Quantity
"
,
"
Payment Receipt Reference
"
];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -121,6 +122,17 @@
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_payment_transaction_external_id
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
13
],
"
default
"
:
gadget
.
state
.
doc
.
payment_transaction_external_id
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
key
"
:
"
payment_transaction_external_id
"
,
"
hidden
"
:
gadget
.
state
.
doc
.
payment_transaction_external_id
===
""
,
"
type
"
:
"
StringField
"
},
"
my_total_price
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
3
],
...
...
@@ -201,7 +213,10 @@
group_list
:
[[
"
left
"
,
[[
"
my_start_date
"
],
[
"
my_reference
"
],
[
"
my_total_price
"
],
[
"
my_resource_title
"
],
[
'
my_payment_state
'
],
[
"
my_download
"
]]
[
"
my_resource_title
"
],
[
"
my_download
"
]]
],[
"
right
"
,
[[
"
my_payment_transaction_external_id
"
],
[
'
my_payment_state
'
]]
],[
"
bottom
"
,
[[
"
listbox
"
]]
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js.xml
View file @
6f975a16
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
992.
9877.18647.5444
2
</string>
</value>
<value>
<string>
992.
11149.35424.2157
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1621
377250.27
</float>
<float>
1621
448974.82
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedPaymentTransactionIntegrationId.py
0 → 100644
View file @
6f975a16
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
raise
Unauthorized
portal
=
context
.
getPortalObject
()
portal_membership
=
portal
.
portal_membership
person
=
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
def
wrapWithShadow
(
**
kw
):
payment
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Payment Transaction"
,
default_causality_uid
=
context
.
getUid
(),
simulation_state
=
"stopped"
)
if
not
payment
:
return
if
context
.
getPaymentMode
()
==
"payzen"
:
return
payment
.
PaymentTransaction_getPayzenId
()
elif
context
.
getPaymentMode
()
==
"wechat"
:
return
payment
.
PaymentTransaction_getWechatId
()
transaction_date
,
transaction_id
=
person
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
person
,
callable_object
=
wrapWithShadow
,
argument_list
=
[])
if
transaction_id
is
None
:
return
return
"%s-%s"
%
(
transaction_date
.
strftime
(
"%Y%m%d"
),
transaction_id
)
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_getRelatedPaymentTransactionIntegrationId.xml
0 → 100644
View file @
6f975a16
<?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>
REQUEST=None
</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_getRelatedPaymentTransactionIntegrationId
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas.xml
View file @
6f975a16
...
...
@@ -98,6 +98,7 @@
<string>
my_start_date
</string>
<string>
my_total_price
</string>
<string>
my_resource_title
</string>
<string>
my_payment_transaction_external_id
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SaleInvoiceTransaction_viewAsHateoas/my_payment_transaction_external_id.xml
0 → 100644
View file @
6f975a16
<?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_external_id
</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_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>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
External Payment 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>
context/SaleInvoiceTransaction_getRelatedPaymentTransactionIntegrationId
</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