Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Arnaud Fontaine
erp5
Commits
163a5c82
Commit
163a5c82
authored
7 years ago
by
Cédric Le Ninivin
Browse files
Options
Download
Email Patches
Plain Diff
AcceptSover: Only applies Solver if it has been defined on the rule
parent
e18af60c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
product/ERP5/Document/AcceptSolver.py
product/ERP5/Document/AcceptSolver.py
+6
-1
No files found.
product/ERP5/Document/AcceptSolver.py
View file @
163a5c82
...
...
@@ -49,6 +49,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
portal
=
self
.
getPortalObject
()
solved_property_list
=
self
.
getConfigurationPropertyDict
()
\
.
get
(
'tested_property_list'
)
solver_portal_type_relative_url
=
self
.
getPortalTypeValue
().
getRelativeUrl
()
if
solved_property_list
is
None
:
solved_property_list
=
\
portal
.
portal_types
.
getTypeInfo
(
self
).
getTestedPropertyList
()
...
...
@@ -59,7 +60,11 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
divergence_list
=
movement
.
getDivergenceList
()
for
divergence
in
divergence_list
:
solved_property
=
divergence
.
getProperty
(
'tested_property'
)
if
solved_property
not
in
solved_property_list
:
# Only apply solver if it has been defined on the Tester
if
(
solved_property
not
in
solved_property_list
)
or
\
(
not
solver_portal_type_relative_url
\
in
portal
.
restrictedTraverse
(
divergence
.
getProperty
(
'tester_relative_url'
)).
getSolverList
()):
continue
new_value
=
divergence
.
getProperty
(
'decision_value'
)
# XXX hard coded
...
...
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