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
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
Ekaterina
erp5
Commits
9f1ce1ba
Commit
9f1ce1ba
authored
Aug 03, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
75309541
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2039 additions
and
823 deletions
+2039
-823
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.Form.py
...mponentTemplateItem/portal_components/module.erp5.Form.py
+1345
-0
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.Form.xml
...ponentTemplateItem/portal_components/module.erp5.Form.xml
+691
-0
product/ERP5/bootstrap/erp5_core/bt/template_module_component_id_list
.../bootstrap/erp5_core/bt/template_module_component_id_list
+1
-0
product/ERP5Form/FSForm.py
product/ERP5Form/FSForm.py
+0
-63
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+2
-760
No files found.
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.Form.py
0 → 100644
View file @
9f1ce1ba
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.Form.xml
0 → 100644
View file @
9f1ce1ba
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/bt/template_module_component_id_list
View file @
9f1ce1ba
...
...
@@ -2,6 +2,7 @@ module.erp5.DateUtils
module.erp5.DiffUtils
module.erp5.ExpandPolicy
module.erp5.ExplanationCache
module.erp5.Form
module.erp5.GeneratedAmountList
module.erp5.Log
module.erp5.MovementCollectionDiff
...
...
product/ERP5Form/FSForm.py
deleted
100644 → 0
View file @
75309541
from
Products.ERP5Type
import
Globals
from
AccessControl
import
ClassSecurityInfo
from
Products.CMFCore.permissions
import
View
,
ViewManagementScreens
from
Products.CMFCore.FSObject
import
FSObject
from
Products.CMFCore.DirectoryView
import
registerFileExtension
,
\
registerMetaType
from
Products.ERP5Form
import
_dtmldir
from
Products.ERP5Form.Form
import
ERP5Form
from
Products.Formulator.XMLToForm
import
XMLToForm
class
ERP5FSForm
(
FSObject
,
ERP5Form
):
"""FSForm."""
meta_type
=
'ERP5 Filesystem Formulator Form'
manage_options
=
(
(
{
'label'
:
'Customize'
,
'action'
:
'manage_main'
},
{
'label'
:
'Test'
,
'action'
:
'formTest'
},
)
)
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
View
)
security
.
declareProtected
(
ViewManagementScreens
,
'manage_main'
)
manage_main
=
Globals
.
DTMLFile
(
'FSForm_customize'
,
_dtmldir
)
def
__init__
(
self
,
id
,
filepath
,
fullname
=
None
,
properties
=
None
):
FSObject
.
__init__
(
self
,
id
,
filepath
,
fullname
,
properties
)
def
_createZODBClone
(
self
):
"""Create a ZODB (editable) equivalent of this object."""
type_info
=
self
.
getPortalObject
().
portal_types
.
getTypeInfo
(
'ERP5 Form'
)
obj
=
type_info
.
constructInstance
(
container
=
self
,
temp_object
=
True
,
id
=
self
.
getId
(),
title
=
self
.
title
).
aq_base
obj
.
set_xml
(
self
.
get_xml
())
return
obj
def
_readFile
(
self
,
reparse
):
f
=
open
(
self
.
_filepath
,
'rb'
)
# update the form with the xml data
try
:
XMLToForm
(
f
.
read
(),
self
)
except
:
# bare except here, but I hope this is ok, as the
# exception should be reraised
# (except if the LOG raises another one ... should we be more paranoid here?)
import
zLOG
zLOG
.
LOG
(
'Formulator.FSForm'
,
zLOG
.
ERROR
,
'error reading form from file '
+
self
.
_filepath
)
raise
f
.
close
()
Globals
.
InitializeClass
(
ERP5FSForm
)
registerFileExtension
(
'form'
,
ERP5FSForm
)
registerMetaType
(
'FSForm'
,
ERP5FSForm
)
product/ERP5Form/Form.py
View file @
9f1ce1ba
This diff is collapsed.
Click to expand it.
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