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
1
Issues
1
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
Roque
erp5
Commits
5d0a22f7
Commit
5d0a22f7
authored
Feb 26, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move away recorded properties of a Component from globals.
parent
1f4715f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
product/ERP5Type/mixin/component.py
product/ERP5Type/mixin/component.py
+7
-7
No files found.
product/ERP5Type/mixin/component.py
View file @
5d0a22f7
...
...
@@ -40,11 +40,6 @@ from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from
zLOG
import
LOG
,
INFO
_recorded_property_name_tuple
=
(
'reference'
,
'version'
,
'text_content'
)
from
ExtensionClass
import
ExtensionClass
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
...
@@ -105,7 +100,7 @@ class RecordablePropertyMetaClass(ExtensionClass):
getter
.
__name__
=
accessor_name
return
getter
for
property_name
in
_recorded_property_name_tuple
:
for
property_name
in
dictionary
[
'_recorded_property_name_tuple'
]
:
setter_name
=
'_set'
+
convertToUpperCase
(
property_name
)
dictionary
[
setter_name
]
=
setterWrapper
(
setter_name
,
property_name
)
...
...
@@ -148,6 +143,11 @@ class ComponentMixin(PropertyRecordableMixin, Base):
'Reference'
,
'TextDocument'
)
_recorded_property_name_tuple
=
(
'reference'
,
'version'
,
'text_content'
)
_message_reference_not_set
=
"Reference must be set"
_message_invalid_reference
=
"Reference cannot end with '_version' or "
\
"start with '_' or be equal to find_module or load_module"
...
...
@@ -241,7 +241,7 @@ class ComponentMixin(PropertyRecordableMixin, Base):
workflow
=
self
.
workflow_history
[
'component_validation_workflow'
][
-
1
]
workflow
[
'error_list'
]
=
error_list
else
:
for
property_name
in
_recorded_property_name_tuple
:
for
property_name
in
self
.
_recorded_property_name_tuple
:
self
.
clearRecordedProperty
(
property_name
)
self
.
validate
()
...
...
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