Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
144
Merge Requests
144
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
8d3a3b52
Commit
8d3a3b52
authored
Jul 23, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_connector: form and script definition moved to corresponding bt
parent
542d1ed6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
548 deletions
+0
-548
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/ERP5Form_viewAsDefinition.xml
...erp5_officejs_jio_connector/ERP5Form_viewAsDefinition.xml
+0
-131
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/ERP5Form_viewAsDefinition/my_fields_raw_properties.xml
...or/ERP5Form_viewAsDefinition/my_fields_raw_properties.xml
+0
-287
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/Form_getFieldsRawProperties.py
...rp5_officejs_jio_connector/Form_getFieldsRawProperties.py
+0
-68
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/Form_getFieldsRawProperties.xml
...p5_officejs_jio_connector/Form_getFieldsRawProperties.xml
+0
-62
No files found.
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/ERP5Form_viewAsDefinition.xml
deleted
100644 → 0
View file @
542d1ed6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Base ERP5 Form view for rendering in renderjs UI
</string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_fields_raw_properties
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Form_viewAsDefinition
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ERP5Form_viewAsJio
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/ERP5Form_viewAsDefinition/my_fields_raw_properties.xml
deleted
100644 → 0
View file @
542d1ed6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/Form_getFieldsRawProperties.py
deleted
100644 → 0
View file @
542d1ed6
from
Products.ERP5Type.Log
import
log
def
getFieldRawProperties
(
field
,
meta_type
=
None
,
key
=
None
,
key_prefix
=
None
):
""" Return the raw properties of the field """
if
meta_type
is
None
:
meta_type
=
field
.
meta_type
if
key
is
None
:
key
=
field
.
generate_field_key
(
key_prefix
=
key_prefix
)
if
meta_type
==
"ProxyField"
:
meta_type
=
field
.
getRecursiveTemplateField
().
meta_type
result
=
{
"type"
:
meta_type
,
"key"
:
key
,
"values"
:
{},
"tales"
:
{},
"overrides"
:
field
.
overrides
,
"message_values"
:
field
.
message_values
}
# these patchs change the field property names as are required by js rendering
form_list_patch
=
False
gadget_field_patch
=
False
for
key
in
field
.
values
.
keys
():
# sometimes, field.values returns a key as string and also as a tuple
if
type
(
key
)
is
str
:
result
[
"values"
][
key
]
=
field
.
values
[
key
]
if
key
==
"columns"
:
form_list_patch
=
True
if
key
==
"gadget_url"
:
gadget_field_patch
=
True
if
form_list_patch
:
try
:
result
[
"values"
][
"column_list"
]
=
result
[
"values"
][
"columns"
]
result
[
"values"
][
"sort_column_list"
]
=
result
[
"values"
][
"sort_columns"
]
result
[
"values"
][
"search_column_list"
]
=
result
[
"values"
][
"search_columns"
]
portal_type
=
result
[
"values"
][
"portal_types"
][
0
][
0
]
if
"portal_types"
in
result
[
"values"
]
else
False
if
not
portal_type
:
portal_type
=
result
[
"values"
][
"portal_type"
][
0
][
0
]
if
"portal_type"
in
result
[
"values"
]
else
False
query
=
"portal_type%3A%22"
+
portal_type
+
"%22"
if
portal_type
else
""
full_query
=
"urn:jio:allDocs?query="
+
query
result
[
"values"
][
"query"
]
=
full_query
except
KeyError
:
log
(
"error while patching form list definition"
)
if
gadget_field_patch
:
try
:
result
[
"values"
][
"url"
]
=
result
[
"values"
][
"gadget_url"
]
result
[
"values"
][
"renderjs_extra"
]
=
result
[
"values"
][
"renderjs_extra"
][
0
][
0
]
except
(
ValueError
,
KeyError
,
IndexError
):
log
(
"error while patching form gadget list definition"
)
for
key
in
field
.
tales
.
keys
():
if
field
.
tales
[
key
]:
result
[
"tales"
][
key
]
=
str
(
field
.
tales
[
key
])
return
result
if
REQUEST
.
get
(
"view"
)
==
"definition_view"
:
traversed_document
=
context
traversed_document_portal_type
=
traversed_document
.
getPortalType
()
if
traversed_document_portal_type
in
(
"ERP5 Form"
,
"ERP5 Report"
):
fields_raw_properties
=
{}
for
group
in
traversed_document
.
Form_getGroupTitleAndId
():
if
'hidden'
in
group
[
"gid"
]:
for
field
in
traversed_document
.
get_fields_in_group
(
group
[
"goid"
]):
if
field
.
id
==
"gadget_field_action_js_script"
:
fields_raw_properties
[
field
.
id
]
=
getFieldRawProperties
(
field
,
key_prefix
=
None
)
continue
for
field
in
traversed_document
.
get_fields_in_group
(
group
[
"goid"
]):
fields_raw_properties
[
field
.
id
]
=
getFieldRawProperties
(
field
,
key_prefix
=
None
)
if
fields_raw_properties
:
return
fields_raw_properties
bt5/erp5_officejs_connector/SkinTemplateItem/portal_skins/erp5_officejs_jio_connector/Form_getFieldsRawProperties.xml
deleted
100644 → 0
View file @
542d1ed6
<?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>
id
</string>
</key>
<value>
<string>
Form_getFieldsRawProperties
</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