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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
a2b47297
Commit
a2b47297
authored
Aug 28, 2020
by
Cédric Le Ninivin
Committed by
Titouan Soulard
Mar 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConsistencyMessage: Make Constraint Usage facultative
parent
1879ed80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
product/ERP5Type/ConsistencyMessage.py
product/ERP5Type/ConsistencyMessage.py
+15
-11
No files found.
product/ERP5Type/ConsistencyMessage.py
View file @
a2b47297
...
@@ -45,17 +45,21 @@ class ConsistencyMessage(ObjectMessage):
...
@@ -45,17 +45,21 @@ class ConsistencyMessage(ObjectMessage):
init specific variable to constraint
init specific variable to constraint
"""
"""
ObjectMessage
.
__init__
(
self
,
object_relative_url
,
message
,
mapping
)
ObjectMessage
.
__init__
(
self
,
object_relative_url
,
message
,
mapping
)
self
.
description
=
constraint
.
description
self
.
description
=
""
self
.
class_name
=
constraint
.
__class__
.
__name__
self
.
class_name
=
"Constraint Message"
# keep track of the relative URL of the constraint to have it included in
self
.
constraint_relative_url
=
""
# the message
if
constraint
:
constraint_relative_url
=
getattr
(
aq_base
(
constraint
),
'relative_url'
,
None
)
self
.
description
=
constraint
.
description
if
not
constraint_relative_url
:
self
.
class_name
=
constraint
.
__class__
.
__name__
try
:
# keep track of the relative URL of the constraint to have it included in
constraint_relative_url
=
constraint
.
getRelativeUrl
()
# the message
except
AttributeError
:
constraint_relative_url
=
getattr
(
aq_base
(
constraint
),
'relative_url'
,
None
)
constraint_relative_url
=
constraint
.
id
if
not
constraint_relative_url
:
self
.
constraint_relative_url
=
constraint_relative_url
try
:
constraint_relative_url
=
constraint
.
getRelativeUrl
()
except
AttributeError
:
constraint_relative_url
=
constraint
.
id
self
.
constraint_relative_url
=
constraint_relative_url
self
.
__dict__
.
update
(
kw
)
self
.
__dict__
.
update
(
kw
)
...
...
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